Path: blob/main/extensions/copilot/test/simulation/workbench/initArgs.ts
13394 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import minimist from 'minimist';67export type InitArgs = {8runOutputDirName?: string;9grep?: string;10};1112/**13* See {@link script/electron/simulationWorkbenchMain.js} for CLI args available.14*/15export function parseInitEventArgs(processArgv: string[]): InitArgs | undefined {1617const parsedArgs = minimist(processArgv);1819let runOutputDirName: string | undefined;20if ('run-dir' in parsedArgs) {21runOutputDirName = parsedArgs['run-dir'];22}2324let grep: string | undefined;25if ('grep' in parsedArgs) {26grep = parsedArgs['grep'];27}2829if (runOutputDirName !== undefined || grep !== undefined) {30return { runOutputDirName, grep };31}32}333435