Skip to content

Commit 7de6c11

Browse files
committed
Insert and remove quotes around pathing for debugger where appropriate to handle folder names w/ spaces
Closes #1075
1 parent 047bbaa commit 7de6c11

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

debugger/src/templates/bat-template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ if defined DAFFODIL_DEBUG_CLASSPATH (
122122

123123

124124
rem Call the application and pass all arguments unchanged.
125-
"%_JAVACMD%" !_JAVA_OPTS! !DAFFODIL_DEBUGGER_OPTS! -cp "%NEW_CLASSPATH%" %MAIN_CLASS% !_APP_ARGS!
125+
"%_JAVACMD%" !_JAVA_OPTS! !DAFFODIL_DEBUGGER_OPTS! -cp %NEW_CLASSPATH% %MAIN_CLASS% !_APP_ARGS!
126126

127127
@endlocal
128128

src/utils.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,10 @@ export async function runScript(
294294
const terminal = getTerminal(hideTerminal, env, createTerminal)
295295

296296
// Create debugger run command
297-
const fullPathToScript = path
298-
.join(scriptPath, 'bin', scriptName)
299-
// fix pathing as emtpy space needs a \ before it to not cause errors
300-
.replace(' ', '\\ ')
301-
const debuggerRunCommand = `${fullPathToScript} ${shellArgs.join(' ')}`
297+
const fullPathToScript = path.join(scriptPath, 'bin', scriptName)
298+
299+
// Surround path to script with quotes to account for spaces
300+
const debuggerRunCommand = `"${fullPathToScript}" ${shellArgs.join(' ')}`
302301

303302
// Send debugger run command to terminal, when exists terminal will stay open
304303
terminal.sendText(debuggerRunCommand)

0 commit comments

Comments
 (0)