We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2b5ee commit 5ed32f4Copy full SHA for 5ed32f4
src/core.js
@@ -48,7 +48,11 @@ export function getVersion() {
48
['--version'],
49
(code, stdout, stderr) => {
50
if (code === 0) {
51
- return resolve(stdout.trim().match(/[\d+\.]+.*$/)[0]);
+ try {
52
+ return resolve(stdout.trim().match(/[\d+\.]+.*$/)[0]);
53
+ } catch (err) {
54
+ return reject(err.toString());
55
+ }
56
}
57
return reject(stderr);
58
0 commit comments