File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,14 @@ private extension TSCBasic.Process {
102
102
environment: [ String : String ] ? = nil ,
103
103
at: String ? = nil
104
104
) async throws -> ( stdout: String , stderr: String ) {
105
- let process = try Self . init (
105
+ let actualCwd = try at. map { try . init( validating: $0) } ?? TSCBasic . localFileSystem. currentWorkingDirectory ?? . root
106
+ let process = Self . init (
106
107
arguments: [ command] + arguments,
107
108
environment: environment ?? ProcessEnv . vars,
108
- workingDirectory: at . map { try . init ( validating : $0 ) } ?? TSCBasic . localFileSystem . currentWorkingDirectory ?? . root ,
109
+ workingDirectory: actualCwd ,
109
110
outputRedirection: . collect( redirectStderr: false ) ,
110
111
startNewProcessGroup: false ,
111
- loggingHandler: nil
112
+ loggingHandler: logger . map { logger in { logger . debug ( " \( $0 ) " , metadata : [ " cwd " : . string ( actualCwd . pathString ) ] ) } }
112
113
)
113
114
114
115
try process. launch ( )
You can’t perform that action at this time.
0 commit comments