mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-19 16:33:04 +03:00
Fixed updates parsing
This commit is contained in:
parent
c392437b5d
commit
77a7421361
1 changed files with 2 additions and 4 deletions
|
@ -84,12 +84,12 @@ export default class Tools
|
|||
|
||||
public static async getGitTags (uri: string): Promise<GitTag[]>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
let git = spawn('git', ['ls-remote', '--tags', uri]),
|
||||
tags: GitTag[] = [];
|
||||
|
||||
git.stdout.on('data', (data: string) => {
|
||||
data.toString().split(/\r\n|\r|\n/).forEach(line => {
|
||||
data.toString().split(/\r\n|\r|\n/).forEach((line: string) => {
|
||||
if (line != '')
|
||||
{
|
||||
let matches = /^([0-9a-f]+)\trefs\/tags\/(.*)/.exec (line);
|
||||
|
@ -103,8 +103,6 @@ export default class Tools
|
|||
});
|
||||
});
|
||||
|
||||
git.stderr.on('data', (data: string) => reject(data));
|
||||
|
||||
git.on('close', () => resolve(tags));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue