Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Jan 9, 2025
1 parent 2053f53 commit 0b5503b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/src/util/cp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import util from "node:util";
import cp from "node:child_process";
import path from "node:path";

/**
* Promisified version of `child_process.execFile`.
Expand All @@ -27,7 +28,7 @@ export { exec };
*/
export async function execFileWithExitCode(file: string, args?: string[], options?: cp.ExecFileOptions): Promise<{ stdout: string; stderr: string; exitCode: number }> {
return new Promise((resolve, reject) => {
if (options?.shell) {
if (options?.shell && path.isAbsolute(file)) {
file = `"${file}"`;
}

Expand Down

0 comments on commit 0b5503b

Please sign in to comment.