Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hanakla committed Feb 22, 2022
1 parent edf47a5 commit 5269ea1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/rowen/src/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ export class Remote {
constructor(private pool: any) {}

public prefix: string = "set -euo pipefail;";
private cwd: string | null;
private cwd: string | null = null;

async local(template: TemplateStringsArray, ...subs: any[]) {
return new Promise((resolve) => {
const proc = spawn(String.raw(template, ...subs), {});
const cmd = String.raw(template, ...subs);
const proc = spawn(cmd, {});

proc.on("exit", (code, sig) => {
resolve({
code,
error: code !== 0,
stdout: proc.stdout,
stdout: null as any,
stderr: null as any,
cmd,
remote: null as any,
} as RemoteResult);
});
});
Expand Down

0 comments on commit 5269ea1

Please sign in to comment.