shell: set utf8 encoding explicity for spawn and as the default for sudo
This commit is contained in:
@@ -152,6 +152,8 @@ async function sudo(tag, args, options) {
|
||||
options.stdio = ['pipe', 'pipe', 'pipe', 'ipc'];
|
||||
}
|
||||
|
||||
if (!options.encoding) options.encoding = 'utf8'; // better error message output
|
||||
|
||||
const spawnArgs = [ ...sudoArgs, ...args ];
|
||||
return await spawn(tag, SUDO, spawnArgs, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user