Skip to content

Commit 34f8291

Browse files
committed
add only quotes when the path has spaces
1 parent 968678a commit 34f8291

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cli/WinWSLCodacyCli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class WinWSLCodacyCli extends MacCodacyCli {
3030
protected preparePathForExec(path: string): string {
3131
// Convert the path to WSL format and wrap in quotes to handle spaces
3232
const wslPath = WinWSLCodacyCli.toWSLPath(path)
33-
return `'${wslPath}'`
33+
return wslPath.includes(' ') ? `"${wslPath}"` : wslPath;
3434
}
3535

3636
protected async execAsync(

0 commit comments

Comments
 (0)