Skip to content

Commit

Permalink
fix(foundryup): discard any local changes when updating version via g…
Browse files Browse the repository at this point in the history
…it (#672)
  • Loading branch information
ArtificialPB authored Feb 5, 2022
1 parent 9c69b49 commit 7023b66
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions foundryup/install
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ else
REPO_PATH="${FOUNDRY_DIR}/${FOUNDRYUP_REPO}"
if [ -d $REPO_PATH ]; then
# If the repo path exists move to it git pull and checkout the branch.
# If the repo path exists move to it and do a force checkout, discarding any local changes
cd $REPO_PATH
git pull
git checkout ${FOUNDRYUP_BRANCH}
git pull
git fetch
git reset --hard origin/${FOUNDRYUP_BRANCH}
else
# Repo path did not exist, grab the author from the repo, make a directory in .foundry, cd to it and clone.
IFS="/" read -ra AUTHOR <<< "$FOUNDRYUP_REPO"
Expand Down

0 comments on commit 7023b66

Please sign in to comment.