hack/cli.sh: Quiet origin cleanup
Don't show `error: No such remote: 'origin'` error when building for the
first time and the cached git repository doesn't a remote yet.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 5433b88e2d
)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
1a078977e1
commit
e5fbc3f75a
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ if curl --head --silent --fail "${DOWNLOAD_URL}" 1> /dev/null 2>&1; then
|
|||
mv docker/docker "${outdir}/docker"
|
||||
else
|
||||
git init -q .
|
||||
git remote remove origin || true
|
||||
git remote remove origin 2> /dev/null || true
|
||||
git remote add origin "${repository}"
|
||||
git fetch -q --depth 1 origin "${version}" +refs/tags/*:refs/tags/*
|
||||
git checkout -fq "${version}"
|
||||
|
|
Loading…
Reference in a new issue