From b344bd42a2738a0bd9b056ac54dbc2ac8e21d1b6 Mon Sep 17 00:00:00 2001 From: stevensecreti Date: Sat, 28 Oct 2023 15:41:47 -0400 Subject: [PATCH] Bugfix - Spaces in Path --- src/utils/getArgs.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils/getArgs.js b/src/utils/getArgs.js index 5caafee5..7535b5cc 100644 --- a/src/utils/getArgs.js +++ b/src/utils/getArgs.js @@ -9,6 +9,13 @@ let args = {}; for (let i = 0; i < argArray.length; i++) { const arg = argArray[i].trim().split(' '); + //Rejoin any arguments that have spaces in them beyond arg[0], + //i.e, directories with spaces in their names + if(arg.length > 2){ + arg[1] = arg.slice(1).join(' '); + arg.splice(2); //Removes the extra arguments + } + if (!arg[0]) continue; args[arg[0].replace(/-/g, '_')] = arg.length > 2 ? arg.slice(1) : (arg[1] || true); }