mirror of
https://github.com/Kong/insomnia.git
synced 2026-05-18 21:55:38 -04:00
fix watch regex and parse args (#4270)
This commit is contained in:
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@@ -91,7 +91,7 @@
|
||||
"regexp": "watching"
|
||||
},
|
||||
"endsPattern": {
|
||||
"regexp": "Built at\\:"
|
||||
"regexp": "\\d+ modules"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user