Check for problems when installing

This commit is contained in:
Ilan Cosman 2022-06-23 11:32:53 -07:00
parent fd6c1b0b90
commit 7c6800ee96
2 changed files with 17 additions and 13 deletions

View File

@ -6,6 +6,8 @@ function _tide_init_install --on-event _tide_init_install
_tide_finish
if status is-interactive
tide bug-report --check || sleep 4
if contains ilancosman/tide (string lower $_fisher_plugins)
set_color bryellow
echo "ilancosman/tide is a development branch. Please install from a release tag:"

View File

@ -1,5 +1,5 @@
function _tide_sub_bug-report
argparse c/clean v/verbose -- $argv
argparse c/clean v/verbose check -- $argv
set -l fish_path (status fish-path)
@ -29,6 +29,7 @@ function _tide_sub_bug-report
"Tide does not work with oh-my-fish installed." \
"Please uninstall it before submitting a bug report." || return
if not set -q _flag_check
set -l fish_startup_time ($fish_path -ic "time $fish_path -c exit" 2>|
string match -r "Executed in(.*)fish" | string trim)[2]
@ -45,6 +46,7 @@ function _tide_sub_bug-report
"fisher plugins: $_fisher_plugins"
end
end
end
function _tide_check_version -a program_name repo_name regex_to_get_version current_version
curl --silent https://github.com/$repo_name/releases/latest |