test
This commit is contained in:
parent
9aca4c7995
commit
2170374134
@ -122,7 +122,25 @@ async function runPlayersDeleter({ levelSavPath, uids }) {
|
|||||||
args.push('--allow-zlib-fallback');
|
args.push('--allow-zlib-fallback');
|
||||||
}
|
}
|
||||||
|
|
||||||
const { stdout, stderr } = await execFileAsync(execPath, args, { timeout: 10 * 60 * 1000 });
|
// Best effort: ensure the binary has execute permission on Linux containers.
|
||||||
|
await fs.chmod(execPath, 0o755).catch(() => {});
|
||||||
|
|
||||||
|
let stdout = '';
|
||||||
|
let stderr = '';
|
||||||
|
try {
|
||||||
|
const result = await execFileAsync(execPath, args, { timeout: 10 * 60 * 1000 });
|
||||||
|
stdout = result.stdout;
|
||||||
|
stderr = result.stderr;
|
||||||
|
} catch (error) {
|
||||||
|
if (error && error.code === 'EACCES') {
|
||||||
|
throw new Error(
|
||||||
|
`Impossible d'exécuter players-deleter (${execPath}): permission refusée (EACCES). ` +
|
||||||
|
`Vérifie que le fichier est exécutable (chmod +x) et que le filesystem n'est pas monté en noexec. ` +
|
||||||
|
`Tu peux aussi définir PLAYERS_DELETER_PATH vers une commande exécutable.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
const out = String(stdout || '').trim();
|
const out = String(stdout || '').trim();
|
||||||
if (out) {
|
if (out) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user