judge: distinguish sandbox error between old version and not running (#813)

This commit is contained in:
Yang Gao authored and GitHub committed 2024-05-19 12:39:29 +08:00
1 parent 1a981b9bf5
commit c516342a21
1 file changed
+2 -1
+2 -1
View File
@@ -230,7 +230,8 @@ export async function versionCheck(reportWarn: (str: string) => void, reportErro
const config = await client.config();
sandboxCgroup = config.runnerConfig?.cgroupType || 0;
} catch (e) {
reportError('Your sandbox version is tooooooo low! Please upgrade!');
if (e?.syscall === 'connect') reportError('Connecting to sandbox failed, please check sandbox_host config and if your sandbox is running.');
else reportError('Your sandbox version is tooooooo low! Please upgrade!');
return false;
}
const { osinfo } = await sysinfo.get();