Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.26.9",
"version": "0.26.10",
"type": "module",
"bin": {
"spawn": "cli.js"
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/shared/orchestrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ export async function delegateCloudCredentials(runner: CloudRunner, _cloudName:
for (const file of filesToDelegate) {
const content = readFileSync(file.localPath, "utf-8");
const b64 = Buffer.from(content).toString("base64");
if (!/^[A-Za-z0-9+/=]+$/.test(b64)) {
throw new Error("Unexpected characters in base64 output");
}
const writeResult = await asyncTryCatch(() =>
runner.runServer(`printf '%s' '${b64}' | base64 -d > ${file.remotePath} && chmod 600 ${file.remotePath}`),
);
Expand Down Expand Up @@ -498,6 +501,9 @@ export async function runOrchestration(
async function injectEnvVars(cloud: CloudOrchestrator, envContent: string): Promise<void> {
logStep("Setting up environment variables...");
const envB64 = Buffer.from(envContent).toString("base64");
if (!/^[A-Za-z0-9+/=]+$/.test(envB64)) {
throw new Error("Unexpected characters in base64 output");
}

const isLocalWindows = cloud.cloudName === "local" && isWindows();
const envSetupCmd = isLocalWindows
Expand Down
Loading