mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
fix(diskpart): Fix diskpart argv when tmpdir contains spaces
This escapes the diskpart script filename when shelling out, to avoid failure when the username and thus the `os.tmpdir()` path contains spaces. Change-Type: patch
This commit is contained in:
parent
995177498f
commit
2045066b16
@ -69,7 +69,7 @@ const runDiskpart = (commands, callback) => {
|
||||
}, (writeError) => {
|
||||
debug('write %s:', filename, writeError || 'OK')
|
||||
|
||||
childProcess.exec(`diskpart /s ${filename}`, (execError, stdout, stderr) => {
|
||||
childProcess.execFile('diskpart', [ '/s', filename ], (execError, stdout, stderr) => {
|
||||
debug('stdout:', stdout)
|
||||
debug('stderr:', stderr)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user