| 957 | } |
| 958 | |
| 959 | function execute(cwd: string, proc: AppProcess.Interface) { |
| 960 | return (args: string[]) => |
| 961 | proc |
| 962 | .run( |
| 963 | ChildProcess.make("git", args, { |
| 964 | cwd, |
| 965 | extendEnv: true, |
| 966 | stdin: "ignore", |
| 967 | }), |
| 968 | ) |
| 969 | .pipe( |
| 970 | Effect.map( |
| 971 | (result) => |
| 972 | ({ |
| 973 | exitCode: result.exitCode, |
| 974 | text: result.stdout.toString("utf8"), |
| 975 | stderr: result.stderr.toString("utf8"), |
| 976 | }) satisfies Result, |
| 977 | ), |
| 978 | ) |
| 979 | } |
| 980 | |
| 981 | function resolvePath(cwd: string, value: string) { |
| 982 | const trimmed = value.replace(/[\r\n]+$/, "") |