Skip to content

Commit b8923d3

Browse files
committed
Check the fish conf.d file
1 parent 9dc18fa commit b8923d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Tests/SwiftlyTests/E2ETests.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ final class E2ETests: SwiftlyTests {
8989
var env = ProcessInfo.processInfo.environment
9090

9191
// Setting this environment helps to ensure that the profile gets sourced with bash, even if it is not in an interactive shell
92-
if shell == "/bin/bash" {
92+
if shell.hasSuffix("bash") {
9393
env["BASH_ENV"] = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".profile").path
94-
} else if shell == "/bin/zsh" {
94+
} else if shell.hasSuffix("zsh") {
9595
env["ZDOTDIR"] = FileManager.default.homeDirectoryForCurrentUser.path
96-
} else if shell == "/bin/fish" {
96+
} else if shell.hasSuffix("fish") {
9797
env["fish_trace"] = "on"
98+
// TODO remove this check
99+
try Swiftly.currentPlatform.runProgram(shell, "cat", FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".config/fish/conf.d/swiftly.fish").path)
98100
}
99101

100102
try Swiftly.currentPlatform.runProgram(shell, "-l", "-c", "swiftly install --assume-yes latest --post-install-file=./post-install.sh", env: env)

0 commit comments

Comments
 (0)