mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
check for help arg (#170958)
This commit is contained in:
parent
0124c36559
commit
e6b39b8368
|
@ -14,21 +14,23 @@ async function main() {
|
|||
|
||||
const args = [...process.argv];
|
||||
|
||||
// get build arg from args
|
||||
let buildArgIndex = args.indexOf('--build');
|
||||
buildArgIndex = buildArgIndex === -1 ? args.indexOf('-b') : buildArgIndex;
|
||||
if (buildArgIndex === -1) {
|
||||
args.push('--build');
|
||||
args.push(getLocalCLIPath());
|
||||
} else {
|
||||
const exePath = args[buildArgIndex + 1];
|
||||
args.splice(buildArgIndex + 1, 1, getExePath(exePath));
|
||||
}
|
||||
if (args.indexOf('--help') === -1 && args.indexOf('-h') === -1) {
|
||||
// get build arg from args
|
||||
let buildArgIndex = args.indexOf('--build');
|
||||
buildArgIndex = buildArgIndex === -1 ? args.indexOf('-b') : buildArgIndex;
|
||||
if (buildArgIndex === -1) {
|
||||
args.push('--build');
|
||||
args.push(getLocalCLIPath());
|
||||
} else {
|
||||
const exePath = args[buildArgIndex + 1];
|
||||
args.splice(buildArgIndex + 1, 1, getExePath(exePath));
|
||||
}
|
||||
|
||||
args.push('--folder');
|
||||
args.push(VSCODE_FOLDER);
|
||||
args.push('--file');
|
||||
args.push(path.join(VSCODE_FOLDER, 'package.json'));
|
||||
args.push('--folder');
|
||||
args.push(VSCODE_FOLDER);
|
||||
args.push('--file');
|
||||
args.push(path.join(VSCODE_FOLDER, 'package.json'));
|
||||
}
|
||||
|
||||
await perf(args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue