Skip to content

Commit

Permalink
Merge pull request #5101 from OmniSharp/quote-path
Browse files Browse the repository at this point in the history
Quote launch paths when necessary
  • Loading branch information
333fred authored Mar 10, 2022
2 parents 090acf0 + 621c989 commit a8df773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/omnisharp/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ async function launchDotnet(launchInfo: LaunchInfo, cwd: string, args: string[],
}
else {
command = platformInfo.isWindows() ? 'dotnet.exe' : 'dotnet';
argsCopy.unshift(launchInfo.DotnetLaunchPath ?? launchInfo.LaunchPath);
argsCopy.unshift(`"${launchInfo.DotnetLaunchPath ?? launchInfo.LaunchPath}"`);
}

const process = spawn(command, argsCopy, { detached: false, cwd, env: dotnetInfo.env });
Expand All @@ -373,7 +373,7 @@ function launchWindows(launchPath: string, cwd: string, args: string[]): LaunchR
}

let argsCopy = args.slice(0); // create copy of args
argsCopy.unshift(launchPath);
argsCopy.unshift(`"${launchPath}"`);
argsCopy = [[
'/s',
'/c',
Expand Down Expand Up @@ -408,7 +408,7 @@ function launchNix(launchPath: string, cwd: string, args: string[]): LaunchResul

function launchNixMono(launchPath: string, cwd: string, args: string[], environment: NodeJS.ProcessEnv, useDebugger: boolean): LaunchResult {
let argsCopy = args.slice(0); // create copy of details args
argsCopy.unshift(launchPath);
argsCopy.unshift(`$"{launchPath}"`);
argsCopy.unshift("--assembly-loader=strict");

if (useDebugger) {
Expand Down

0 comments on commit a8df773

Please sign in to comment.