4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@@ -62,9 +62,9 @@ function getVersion() {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
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());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ export async function getVersion(): Promise<string> {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
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());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user