chore: Escape white space in command arguments

This commit is contained in:
mauro 🤙 2024-09-14 12:58:40 +00:00
parent 51e3ef292c
commit d3f18bab4c
2 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@zen-browser/surfer", "name": "@zen-browser/surfer",
"version": "1.3.21", "version": "1.4.0",
"description": "Simplifying building firefox forks!", "description": "Simplifying building firefox forks!",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

View file

@ -65,6 +65,11 @@ export const configDispatch = (
} }
} }
const args = [];
for (const arg of config?.args || []) {
// replace white space with escaped white space
args.push(arg.replace(/\s/g, '\\ '))
}
return new Promise((resolve) => { return new Promise((resolve) => {
const proc = execa(cmd, config?.args, { const proc = execa(cmd, config?.args, {
cwd: config?.cwd || process.cwd(), cwd: config?.cwd || process.cwd(),