Skip to content

Commit

Permalink
quoted --config arg for win32, v0.3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
junstyle committed Sep 6, 2024
1 parent 7e4d175 commit e89b683
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ class PHPCSFixer extends PHPCSFixerConfig {
for (let i = 0, len = files.length; i < len; i++) {
let c = files[i]
if (fs.existsSync(c)) {
args.push('--config=' + c)
if (process.platform == 'win32') {
args.push('--config="' + c.replace(/"/g, "\\\"") + '"')
} else {
args.push('--config=' + c)
}
useConfig = true
break
}
Expand Down

0 comments on commit e89b683

Please sign in to comment.