Skip to content

Commit 33d069e

Browse files
committed
Insert and remove quotes around pathing for debugger where appropriate to handle folder names w/ spaces
1 parent a6f1cbc commit 33d069e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

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/dataEditor/dataEditorClient.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,11 @@ async function serverStart() {
12571257
throw new Error(`Log config file '${logConfigFile}' not found`)
12581258
}
12591259

1260+
const x = OMEGA_EDIT_HOST
1261+
const y = getPidFile(omegaEditPort)
1262+
const z = logConfigFile
1263+
1264+
console.log(x, y, z)
12601265
// Start the server and wait up to 10 seconds for it to start
12611266
const serverPid = (await Promise.race([
12621267
startServer(

src/utils.ts

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

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

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

0 commit comments

Comments
 (0)