Browse Source

release-scripts: Remove misleading error message

In the normal course of script execution, clone_repo.sh routinely logs
the following error message:

error: pathspec 'xxx' did not match any file(s) known to git

This error can be safely ignored, as the script moves on to checking out
master instead. But it can be (and has been) mistakenly interpreted as
the reason why the script fails.

This change avoids logging the error message and logs a clearer
explanation instead.

Change-Id: Iaaaed7b0ea343bd81b8ad898654658545942a3d0
changes/53/769353/1
Thierry Carrez 3 months ago
parent
commit
885330b8e7
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      roles/copy-release-tools-scripts/files/release-tools/clone_repo.sh

+ 3
- 2
roles/copy-release-tools-scripts/files/release-tools/clone_repo.sh View File

@ -194,6 +194,7 @@ else
# directory already existed we might have checked out something else
# before so just do it again).
(cd $local_dir &&
(git checkout $BRANCH || git checkout master) &&
retry git pull --ff-only)
(git checkout $BRANCH 2>/dev/null ||
(echo "No $BRANCH, checking out master"; git checkout master)) &&
retry git pull --ff-only)
fi

Loading…
Cancel
Save