fix(deploy): detect SSH tooling without connecting

This commit is contained in:
DeCentN2Madness authored and AIAMarketing committed 2026-11-05 00:40:18 -07:00
1 parent ba93a54942
commit 362b984753
1 file changed
+1 -1
+1 -1
View File
@@ -30,7 +30,7 @@ function run(command, args, { cwd = toolRoot, env = process.env, quiet = false }
if (result.status !== 0) fail(`${command} failed${result.stderr ? `: ${result.stderr.trim()}` : ''}`);
return result.stdout.trim();
}
function commandExists(command) { return spawnSync(command, ['--version'], { stdio: 'ignore' }).status === 0; }
function commandExists(command) { return spawnSync('which', [command], { stdio: 'ignore' }).status === 0; }
function safeRelative(name) {
const normalized = name.replaceAll(path.sep, '/');
if (!normalized || normalized.startsWith('/') || normalized.split('/').some((part) => !part || part === '.' || part === '..' || /[\x00-\x1f\\";{}]/.test(part))) fail(`Unsafe inventory path: ${name}`);