Fix export returning 1 on success

Fixes #4435

(cherry picked from commit 1ef310c3a8)
This commit is contained in:
Aaron Gyes 2017-10-01 01:08:10 -07:00 committed by David Adam
parent 7b5f1f018b
commit 417be25c69

View File

@ -13,6 +13,8 @@ function export --description 'Set env variable. Alias for `set -gx` for bash co
set -l colonized_path (string replace -- "$$v[1]" (string join ":" -- $$v[1]) $v[2]) set -l colonized_path (string replace -- "$$v[1]" (string join ":" -- $$v[1]) $v[2])
set -gx $v[1] (string split ":" -- $colonized_path) set -gx $v[1] (string split ":" -- $colonized_path)
else else
# status is 1 from the contains check, and `set` does not change the status on success: reset it.
true
set -gx $v[1] $v[2] set -gx $v[1] $v[2]
end end
end end