shell: set utf8 encoding explicity for spawn and as the default for sudo
This commit is contained in:
@@ -691,7 +691,7 @@ async function update(name, memory) {
|
||||
// scale back db containers, if possible. this is retried because updating memory constraints can fail
|
||||
// with failed to write to memory.memsw.limit_in_bytes: write /sys/fs/cgroup/memory/docker/xx/memory.memsw.limit_in_bytes: device or resource busy
|
||||
for (let times = 0; times < 10; times++) {
|
||||
const [error] = await safe(shell.spawn('docker', ['update', '--memory', memory, '--memory-swap', '-1', name], {}));
|
||||
const [error] = await safe(shell.spawn('docker', ['update', '--memory', memory, '--memory-swap', '-1', name], { encoding: 'utf8' }));
|
||||
if (!error) return;
|
||||
await timers.setTimeout(60 * 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user