Skip to content

Commit f4c25e7

Browse files
committed
Set BASH_ENV to force the user ~/.profile to get loaded by the bash shell
1 parent 0655242 commit f4c25e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/SwiftlyTests/E2ETests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ final class E2ETests: SwiftlyTests {
9797
}
9898
try Swiftly.currentPlatform.runProgram(shell, "-v", "-l", "-c", "shopt")
9999

100-
try Swiftly.currentPlatform.runProgram(shell, "-v", "-l", "-c", "swiftly install --assume-yes latest --post-install-file=./post-install.sh")
100+
var env = ProcessInfo.processInfo.environment
101+
env["BASH_ENV"] = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".profile").path
102+
try Swiftly.currentPlatform.runProgram(shell, "-v", "-l", "-c", "swiftly install --assume-yes latest --post-install-file=./post-install.sh", env: env)
101103

102104
if FileManager.default.fileExists(atPath: "./post-install.sh") {
103105
try Swiftly.currentPlatform.runProgram(shell, "./post-install.sh")

0 commit comments

Comments
 (0)