convert more execSync to async
This commit is contained in:
@@ -2835,7 +2835,7 @@ async function uploadFile(app, sourceFilePath, destFilePath) {
|
||||
|
||||
// the built-in bash printf understands "%q" but not /usr/bin/printf.
|
||||
// ' gets replaced with '\'' . the first closes the quote and last one starts a new one
|
||||
const escapedDestFilePath = safe.child_process.execSync(`printf %q '${destFilePath.replace(/'/g, '\'\\\'\'')}'`, { shell: '/bin/bash', encoding: 'utf8' });
|
||||
const escapedDestFilePath = await shell.promises.exec('uploadFile', `printf %q '${destFilePath.replace(/'/g, '\'\\\'\'')}'`, { shell: '/bin/bash', encoding: 'utf8' });
|
||||
debug(`uploadFile: ${sourceFilePath} -> ${escapedDestFilePath}`);
|
||||
|
||||
const execId = await createExec(app, { cmd: [ 'bash', '-c', `cat - > ${escapedDestFilePath}` ], tty: false });
|
||||
|
||||
Reference in New Issue
Block a user