fix watch regex and parse args (#4270)

This commit is contained in:
Jack Kavanagh authored and GitHub committed 2021-12-15 11:26:44 +00:00
1 parent fa4cf3f7b7
commit 0abbefaf9e
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -91,7 +91,7 @@
"regexp": "watching"
},
"endsPattern": {
"regexp": "Built at\\:"
"regexp": "\\d+ modules"
}
}
},
+3 -1
View File
@@ -5,13 +5,15 @@
* It allows us to provide a free text prompt to the user to pass any inso extra arguments.
* https://github.com/microsoft/vscode/issues/83678
*/
const shellwords = require("shellwords");
let args = process.argv;
if (args.length >= 2 && require('inspector').url()) {
args = process.argv.reduce((allArgs, arg) => [...allArgs, ...arg.split(/\s/)], []);
args = process.argv.reduce((allArgs, arg) => [...allArgs, ...shellwords.split(arg)], []);
}
// This should always be the same as bin/inso
global.require = require;
const insomniacli = require('../dist/index.js');
insomniacli.go(args);