From a99d89bde4853527b013d47b3754ff62ef019f1e Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Wed, 24 Feb 2016 10:20:48 +0900 Subject: [PATCH] Do not use `env` to export GIT_ASKPASS. --- functions/__fisher_url_clone.fish | 3 ++- functions/fisher_install.fish | 10 +++++----- test/url-clone.fish | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/functions/__fisher_url_clone.fish b/functions/__fisher_url_clone.fish index 35316cc..133a86b 100644 --- a/functions/__fisher_url_clone.fish +++ b/functions/__fisher_url_clone.fish @@ -1,3 +1,4 @@ function __fisher_url_clone -a url path - env GIT_ASKPASS=/bin/echo git clone -q --depth 1 $url $path + set -lx GIT_ASKPASS /bin/echo + git clone -q --depth 1 $url $path end diff --git a/functions/fisher_install.fish b/functions/fisher_install.fish index db7ae97..f3d9ef8 100644 --- a/functions/fisher_install.fish +++ b/functions/fisher_install.fish @@ -44,7 +44,7 @@ function fisher_install -d "Install Plugins" __fisher_file end | while read -l item - debug "Validate '%s'" $item + debug "Validate %s" $item if not set item (__fisher_plugin_validate $item) printf "fisher: '%s' is not a valid name, path or URL.\n" $item > $stderr @@ -53,7 +53,7 @@ function fisher_install -d "Install Plugins" switch "$item" case https://gist.github.com\* - debug "Install a Gist '%s'" $item + debug "Install gist %s" $item if set -l name (__fisher_gist_to_name $item) printf "%s %s\n" $item $name @@ -63,18 +63,18 @@ function fisher_install -d "Install Plugins" end case \*/\* - debug "Install from a URL or path '%s'" $item + debug "Install URL %s" $item printf "%s %s\n" $item (printf "%s\n" $item | __fisher_name) case \* if set -l url (fisher_search --url --name=$item --index=$fisher_cache/.index) - debug "Install '%s'" $item + debug "Install %s" $item printf "%s %s\n" $url $item else if test -d $fisher_cache/$item - debug "Install from '%s'" \$fisher_cache/$item + debug "Install %s" \$fisher_cache/$item printf "%s %s\n" (__fisher_url_from_path $fisher_cache/$item) $item diff --git a/test/url-clone.fish b/test/url-clone.fish index e50a46a..205f000 100644 --- a/test/url-clone.fish +++ b/test/url-clone.fish @@ -12,7 +12,7 @@ for plugin in foo bar set -l url https://github.com/$plugin/$plugin set -l path config/cache/$plugin - test "$TESTNAME - Use Git to clone repo in <$url> into <$path>" + test "$TESTNAME - Use Git to clone repo <$url> into <$path>" clone $url $path = (__fisher_url_clone $url $path) end end