Specify remote/branch to pull from

This commit is contained in:
TEC 2024-02-15 15:49:08 +08:00
parent 28bb161563
commit 3e5a7b004a
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 5 additions and 2 deletions

View File

@ -81,7 +81,7 @@ end
function update()
(; startup, setup) = _install_paths()
if readline(startup) != STARTUP_MANAGED_MESSAGE
@warn "Startup.jl is not managed by Setup, re-installing"
@warn "startup.jl is not managed by Setup, re-installing"
return install()
else
write(startup, STARTUP_CONTENT)
@ -90,6 +90,9 @@ function update()
ispath(setup) || @warn "Setup missing, re-installing"
return install()
end
success(Cmd(`git pull`, dir=setup)) ||
if success(Cmd(`git pull origin master`, dir=setup))
@info "Sucessfully updated Setup"
else
@error "Failed to update Setup"
end
end