diff --git a/mytonctrl/mytonctrl.py b/mytonctrl/mytonctrl.py index ff12e510..7f321214 100755 --- a/mytonctrl/mytonctrl.py +++ b/mytonctrl/mytonctrl.py @@ -324,7 +324,7 @@ def check_git(input_args, default_repo, text, default_branch='master'): #end define def check_branch_exists(author, repo, branch): - if is_hex(branch): + if len(branch) >= 6 and is_hex(branch): print('Hex name detected, skip branch existence check.') return url = f"https://github.com/{author}/{repo}.git" diff --git a/mytonctrl/scripts/update.sh b/mytonctrl/scripts/update.sh index 463d422c..8bd4ecd9 100644 --- a/mytonctrl/scripts/update.sh +++ b/mytonctrl/scripts/update.sh @@ -37,8 +37,8 @@ pip3 uninstall -y mytonctrl # Update code echo "https://github.com/${author}/${repo}.git -> ${branch}" -git clone --branch ${branch} --recursive https://github.com/${author}/${repo}.git -cd ${repo} +git clone --recursive https://github.com/${author}/${repo}.git +cd ${repo} && git checkout ${branch} pip3 install -U . systemctl daemon-reload