Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fish-foreign-env: suppress additional harmless warnings #31646

Merged
merged 1 commit into from Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/shells/fish-foreign-env/default.nix
Expand Up @@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
-i $out/share/fish-foreign-env/functions/*
'';

patches = [ ./hide-path-warnings.patch ];
patches = [ ./suppress-harmless-warnings.patch ];

meta = with stdenv.lib; {
description = "A foreign environment interface for Fish shell";
Expand Down
@@ -1,16 +1,23 @@
diff --git a/functions/fenv.apply.fish b/functions/fenv.apply.fish
index 34a25e3..6837e7f 100644
index 34a25e3..3d94135 100644
--- a/functions/fenv.apply.fish
+++ b/functions/fenv.apply.fish
@@ -30,8 +30,9 @@ function fenv.apply
@@ -27,11 +27,17 @@ function fenv.apply
for variable in $variables
set key (echo $variable | sed 's/=.*//')
set value (echo $variable | sed 's/[^=]*=//')
+ set ignore PATH _

if test "$key" = 'PATH'
set value (echo $value | tr ':' '\n')
end

- set -g -x $key $value
+ if contains $key $ignore
+ set -g -x $key $value ^/dev/null
+ else
+ set -g -x $key $value
end
-
- set -g -x $key $value
+ end
+
end
end