mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-25 04:06:42 +00:00
Fix sudo-prompt promisification
Changelog-entry: Fix sudo-prompt promisification Change-type: patch
This commit is contained in:
parent
f0bbd1a1cd
commit
b7e82f7694
@ -29,7 +29,10 @@ import { tmpFileDisposer } from './utils';
|
|||||||
|
|
||||||
const execAsync = promisify(childProcess.exec);
|
const execAsync = promisify(childProcess.exec);
|
||||||
const execFileAsync = promisify(childProcess.execFile);
|
const execFileAsync = promisify(childProcess.execFile);
|
||||||
const sudoExecAsync = promisify(sudoPrompt.exec);
|
// sudo-prompt's exec callback is function(error, stdout, stderr) so we need multiArgs
|
||||||
|
const sudoExecAsync = Bluebird.promisify(sudoPrompt.exec, {
|
||||||
|
multiArgs: true,
|
||||||
|
}) as (cmd: string, options: any) => Bluebird<[string, string]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary The user id of the UNIX "superuser"
|
* @summary The user id of the UNIX "superuser"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user