diff --git a/scripts/upgrade b/scripts/upgrade index 8ba19e0..1f058b6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then - if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; + if [ `cd $final_path && git rev-parse --is-inside-work-tree --quiet 2>/dev/null` ]; then pushd "$final_path" if [ $update -eq 1 ] @@ -119,12 +119,9 @@ then # Download, check integrity, uncompress and patch the source from app.src if [ $update -eq 1 ] then - - git clone -c advice.detachedHead=false --quiet -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path - + git clone -c advice.detachedHead=false --quiet -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path else git clone -c advice.detachedHead=false --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path - fi ynh_secure_remove bootstrap/cache/*