mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
fix: a fix for the detached HEAD issue when updating klipper that was introduced in a past commit. the user now gets a warn message that he needs to force update klipper. behind the scenes he will be brought back onto the branch and head gets reattached.
This commit is contained in:
@@ -66,7 +66,12 @@ update_klipper(){
|
||||
read_branch
|
||||
save_klipper_state
|
||||
status_msg "Updating $GET_BRANCH"
|
||||
cd $KLIPPER_DIR && git pull && ok_msg "Update successfull!"
|
||||
cd $KLIPPER_DIR
|
||||
if [ "$DETACHED_HEAD" == "true" ]; then
|
||||
git checkout $GET_BRANCH
|
||||
unset DETACHED_HEAD
|
||||
fi
|
||||
git pull && ok_msg "Update successfull!"
|
||||
|
||||
#check for possible new dependencies and install them
|
||||
status_msg "Checking for possible new dependencies ..."
|
||||
|
||||
Reference in New Issue
Block a user