Merge pull request #39 from crazy-max/trim

Ensure trimmed output
This commit is contained in:
CrazyMax
2021-07-01 17:10:11 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

4
dist/index.js generated vendored
View File

@@ -62,9 +62,9 @@ function getVersion() {
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr);
throw new Error(res.stderr.trim());
}
return parseVersion(res.stdout);
return parseVersion(res.stdout.trim());
});
});
}

View File

@@ -23,9 +23,9 @@ export async function getVersion(): Promise<string> {
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr);
throw new Error(res.stderr.trim());
}
return parseVersion(res.stdout);
return parseVersion(res.stdout.trim());
});
}