mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-05 09:32:37 +02:00
Check if git, curl, etc., are installed before using them and inform the user. Close #253.
This commit is contained in:
parent
a1d6b3a360
commit
5caee73371
1 changed files with 30 additions and 0 deletions
30
fisher.fish
30
fisher.fish
|
@ -177,6 +177,36 @@ function fisher
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
switch "$cmd"
|
||||||
|
case install update
|
||||||
|
if not command -s git > /dev/null
|
||||||
|
__fisher_log error "
|
||||||
|
git is required to download plugin repositories.
|
||||||
|
" > /dev/stderr
|
||||||
|
|
||||||
|
__fisher_log info "
|
||||||
|
Please install git and try again.
|
||||||
|
Visit <https://git-scm.com> for more information.
|
||||||
|
" $__fisher_stderr
|
||||||
|
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
case ls ls-remote
|
||||||
|
if not command -s curl > /dev/null
|
||||||
|
__fisher_log error "
|
||||||
|
curl is required to query the GitHub API.
|
||||||
|
" > /dev/stderr
|
||||||
|
|
||||||
|
__fisher_log info "
|
||||||
|
Please install curl and try again.
|
||||||
|
Refer to your package manager documentation for instructions.
|
||||||
|
" $__fisher_stderr
|
||||||
|
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
switch "$cmd"
|
switch "$cmd"
|
||||||
case install
|
case install
|
||||||
if __fisher_install $items
|
if __fisher_install $items
|
||||||
|
|
Loading…
Reference in a new issue