Skip to content

Commit

Permalink
Revert removal of cwd info
Browse files Browse the repository at this point in the history
  • Loading branch information
paescuj authored May 21, 2023
1 parent d618106 commit 56ab798
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export class Command implements CommandInfo {
/** @inheritdoc */
readonly env: Record<string, unknown>;

/** @inheritdoc */
readonly cwd?: string;

readonly close = new Rx.Subject<CloseEvent>();
readonly error = new Rx.Subject<unknown>();
readonly stdout = new Rx.Subject<Buffer>();
Expand All @@ -120,7 +123,7 @@ export class Command implements CommandInfo {
}

constructor(
{ index, name, command, prefixColor, env }: CommandInfo & { index: number },
{ index, name, command, prefixColor, env, cwd }: CommandInfo & { index: number },
spawnOpts: SpawnOptions,
spawn: SpawnCommand,
killProcess: KillProcess
Expand All @@ -130,6 +133,7 @@ export class Command implements CommandInfo {
this.command = command;
this.prefixColor = prefixColor;
this.env = env || {};
this.cwd = cwd;
this.killProcess = killProcess;
this.spawn = spawn;
this.spawnOpts = spawnOpts;
Expand Down

0 comments on commit 56ab798

Please sign in to comment.