mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-07 11:04:36 +01:00
Actually fix quoted string args
This commit is contained in:
@ -29,7 +29,7 @@ export function parseCommands(commands: string): string[] {
|
||||
}
|
||||
|
||||
export function parseCommand(command: string): (string | number | boolean)[] {
|
||||
const commandArgs = command.match(/(?:("[^"]+"|'[^']+'|[^\s]+))+?/g);
|
||||
const commandArgs = command.match(/(?:("[^"]*"|'[^']*'|[^\s]+))+?/g);
|
||||
if (!commandArgs) return [];
|
||||
const argsToReturn = commandArgs.map(parseArg);
|
||||
return argsToReturn;
|
||||
|
Reference in New Issue
Block a user