From 77a74213611fb7bfe05d6f1627e804b812edce4e Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Mon, 29 Nov 2021 19:28:13 +0200 Subject: [PATCH] Fixed updates parsing --- src/ts/lib/Tools.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ts/lib/Tools.ts b/src/ts/lib/Tools.ts index 049b97d..7174d3b 100644 --- a/src/ts/lib/Tools.ts +++ b/src/ts/lib/Tools.ts @@ -84,12 +84,12 @@ export default class Tools public static async getGitTags (uri: string): Promise { - 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)); }); }