fix: require explicit trans shell operations
This commit is contained in:
@@ -1226,7 +1226,7 @@ function desiredChecks(pg: PostgresHostConfig, facts: RemoteFacts, secrets: Secr
|
||||
}
|
||||
|
||||
async function remoteFacts(config: UniDeskConfig, pg: PostgresHostConfig, secrets: SecretInspection | null): Promise<{ capture: SshCaptureResult; parsed: RemoteFacts | null }> {
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["script"], factsScript(pg, appProbes(pg, secrets)));
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["sh"], factsScript(pg, appProbes(pg, secrets)));
|
||||
const parsed = parseJsonOutput(capture.stdout) as RemoteFacts | null;
|
||||
return { capture, parsed };
|
||||
}
|
||||
@@ -1486,7 +1486,7 @@ function releaseUrl(pg: PostgresHostConfig): string {
|
||||
async function startRemoteApplyJob(config: UniDeskConfig, pg: PostgresHostConfig, localState: { inspection: SecretInspection }): Promise<RemoteJobStart> {
|
||||
const payload = remoteApplyPayload(pg, localState.inspection);
|
||||
const script = startRemoteApplyJobScript(pg, payload);
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["script"], script);
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["sh"], script);
|
||||
const parsed = parseJsonOutput(capture.stdout);
|
||||
return {
|
||||
ok: capture.exitCode === 0 && parsed !== null && parsed.ok === true,
|
||||
@@ -1938,7 +1938,7 @@ printf '\\n---LOG---\\n'
|
||||
if [ -f "$log" ]; then tail -80 "$log"; fi
|
||||
ROOT
|
||||
`;
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["script"], script);
|
||||
const capture = await runSshCommandCapture(config, pg.node.route, ["sh"], script);
|
||||
const [stateText, logTail = ""] = capture.stdout.split("\n---LOG---\n");
|
||||
const parsed = parseJsonOutput(stateText) ?? {};
|
||||
const statusValue = typeof parsed.status === "string" ? parsed.status : null;
|
||||
|
||||
Reference in New Issue
Block a user