diff --git a/Library/Homebrew/test/utils/shell_spec.rb b/Library/Homebrew/test/utils/shell_spec.rb index 8edc84c50b738..e0edf6fd28581 100644 --- a/Library/Homebrew/test/utils/shell_spec.rb +++ b/Library/Homebrew/test/utils/shell_spec.rb @@ -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 diff --git a/Library/Homebrew/utils/shell.rb b/Library/Homebrew/utils/shell.rb index 47a22749de8da..edcbd26da4744 100644 --- a/Library/Homebrew/utils/shell.rb +++ b/Library/Homebrew/utils/shell.rb @@ -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