Skip to content

Commit

Permalink
Merge pull request #11349 from davidxia/fish-path
Browse files Browse the repository at this point in the history
fix: use recommended way of updating Fish shell $PATH
  • Loading branch information
MikeMcQuaid authored May 11, 2021
2 parents fca0fb1 + 7920006 commit f35bb42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/test/utils/shell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
ENV["SHELL"] = "/usr/local/bin/fish"
ENV["fish_user_paths"] = "/some/path"
expect(described_class.prepend_path_in_profile(path))
.to eq("echo 'set -g fish_user_paths \"#{path}\" $fish_user_paths' >> #{shell_profile}")
.to eq("echo 'fish_add_path #{path}' >> #{shell_profile}")
end
end
end
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def prepend_path_in_profile(path)
when :csh, :tcsh
"echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
when :fish
"echo 'set -g fish_user_paths \"#{sh_quote(path)}\" $fish_user_paths' >> #{profile}"
"echo 'fish_add_path #{sh_quote(path)}' >> #{profile}"
end
end

Expand Down

0 comments on commit f35bb42

Please sign in to comment.