diff --git a/mod.test.ts b/mod.test.ts index 2aeb205..f0a1dc0 100644 --- a/mod.test.ts +++ b/mod.test.ts @@ -53,7 +53,7 @@ Deno.test("should not get stderr when inherited only (default)", async () => { assertThrows( () => output.stderr, Error, - `Stderr was not piped (was inherit). Call .stderr("piped") or .stderr("capture") when building the command.`, + `Stderr was not piped (was inherit). Call .stderr("piped") or .stderr("inheritPiped") when building the command.`, ); }); @@ -63,7 +63,7 @@ Deno.test("should not get stderr when null", async () => { assertThrows( () => output.stderr, Error, - `Stderr was not piped (was null). Call .stderr("piped") or .stderr("capture") when building the command.`, + `Stderr was not piped (was null). Call .stderr("piped") or .stderr("inheritPiped") when building the command.`, ); }); diff --git a/src/command.ts b/src/command.ts index 1fe0eba..0a36967 100644 --- a/src/command.ts +++ b/src/command.ts @@ -788,7 +788,7 @@ export class CommandResult { } if (typeof this.#stdout === "string") { throw new Error( - `Stdout was not piped (was ${this.#stdout}). Call .stdout("piped") or .stdout("capture") when building the command.`, + `Stdout was not piped (was ${this.#stdout}). Call .stdout("piped") or .stdout("inheritPiped") when building the command.`, ); } return this.#stdout.bytes({ copy: false }); @@ -827,7 +827,7 @@ export class CommandResult { } if (typeof this.#stderr === "string") { throw new Error( - `Stderr was not piped (was ${this.#stderr}). Call .stderr("piped") or .stderr("capture") when building the command.`, + `Stderr was not piped (was ${this.#stderr}). Call .stderr("piped") or .stderr("inheritPiped") when building the command.`, ); } return this.#stderr.bytes({ copy: false });