mirror of
https://github.com/jorgebucaran/fisher
synced 2024-07-02 23:11:48 +02:00
fix: don't fetch a pkg you already fetched
This commit is contained in:
parent
3e0bca9e47
commit
94801fb177
10
fisher.fish
10
fisher.fish
|
@ -193,7 +193,7 @@ function _fisher_pkg_fetch_all
|
|||
set -l pkg_jobs
|
||||
set -l local_pkgs
|
||||
set -l actual_pkgs
|
||||
set -l fetched_pkgs
|
||||
set -l expected_pkgs
|
||||
|
||||
for name in $argv
|
||||
switch $name
|
||||
|
@ -227,6 +227,7 @@ function _fisher_pkg_fetch_all
|
|||
) "\t" pkg
|
||||
}' | read -l url pkg
|
||||
|
||||
if test ! -d "$fisher_config/$pkg"
|
||||
fish -c "
|
||||
echo fetching $url >&2
|
||||
command mkdir -p \"$fisher_config/$pkg\"
|
||||
|
@ -244,12 +245,13 @@ function _fisher_pkg_fetch_all
|
|||
" >/dev/null &
|
||||
|
||||
set pkg_jobs $pkg_jobs (_fisher_jobs --last)
|
||||
set fetched_pkgs $fetched_pkgs "$pkg"
|
||||
set expected_pkgs $expected_pkgs "$pkg"
|
||||
end
|
||||
end
|
||||
|
||||
if test ! -z "$pkg_jobs"
|
||||
_fisher_wait $pkg_jobs
|
||||
for pkg in $fetched_pkgs
|
||||
for pkg in $expected_pkgs
|
||||
if test -d "$fisher_config/$pkg"
|
||||
set actual_pkgs $actual_pkgs $pkg
|
||||
_fisher_pkg_install $fisher_config/$pkg
|
||||
|
@ -269,8 +271,8 @@ function _fisher_pkg_fetch_all
|
|||
end
|
||||
|
||||
if test ! -z "$actual_pkgs"
|
||||
printf "%s\n" $actual_pkgs
|
||||
_fisher_pkg_fetch_all (_fisher_pkg_get_deps $actual_pkgs | command sort --unique)
|
||||
printf "%s\n" $actual_pkgs
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue