This commit is contained in:
2026-06-25 12:54:29 -05:00
parent 56e34475fc
commit 6c6514e70f
4 changed files with 101 additions and 31 deletions

View File

@@ -149,11 +149,11 @@ async function runHost(jobId, script, host, executionContext) {
return;
}
const secret = decryptSecret(host);
const wrapper = buildWrapper(script.content, host, executionContext);
const file = path.join(os.tmpdir(), `poshmanager-${jobId}-${host.id}.ps1`);
try {
const secret = decryptSecret(host);
const wrapper = buildWrapper(script.content, host, executionContext);
await fs.writeFile(file, wrapper, { mode: 0o600 });
await spawnPowerShell(jobId, host, file, secret, executionContext);
} catch (error) {