File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -999,8 +999,9 @@ extension SwiftPackageTool {
999
999
writableDirectories. append ( AbsolutePath ( pathString, relativeTo: swiftTool. originalWorkingDirectory) )
1000
1000
}
1001
1001
1002
- // Use the directory containing the compiler as an additional search directory.
1002
+ // Use the directory containing the compiler as an additional search directory, and add the $PATH .
1003
1003
let toolSearchDirs = [ try swiftTool. getToolchain ( ) . swiftCompilerPath. parentDirectory]
1004
+ + getEnvSearchPaths( pathString: ProcessEnv . path, currentWorkingDirectory: . none)
1004
1005
1005
1006
// Create the cache directory, if needed.
1006
1007
try localFileSystem. createDirectory ( cacheDir, recursive: true )
Original file line number Diff line number Diff line change @@ -1288,6 +1288,11 @@ final class PackageToolTests: CommandsTestCase {
1288
1288
print( " Looking for swiftc... " )
1289
1289
let swiftc = try context.tool(named: " swiftc " )
1290
1290
print( " ... found it at \\ (swiftc.path) " )
1291
+
1292
+ // Check that we can find a standard tool.
1293
+ print( " Looking for sed... " )
1294
+ let sed = try context.tool(named: " sed " )
1295
+ print( " ... found it at \\ (sed.path) " )
1291
1296
}
1292
1297
}
1293
1298
"""
You can’t perform that action at this time.
0 commit comments