From 77747657f65a5fe26c281445b6ee9a1d6e72b1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Tue, 25 May 2021 19:51:12 +0200 Subject: [PATCH] support old Git versions, like the one from Ubuntu-18.04 --- scripts/build_nim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 95938d6..d901fb3 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -59,7 +59,8 @@ nim_needs_rebuilding() { fi pushd "${NIM_DIR}" >/dev/null - git restore . + # support old Git versions, like the one from Ubuntu-18.04 + git restore . 2>/dev/null || git reset --hard if ! git checkout -q ${NIM_COMMIT}; then # Pay the price for a non-default NIM_COMMIT here, by fetching everything. # (This includes upstream branches and tags that might be missing from our fork.)