From 7b596b4e1f5375f047b10bab1ed1c7169a39c19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Mon, 16 Dec 2024 07:05:00 +0000 Subject: [PATCH] #Fixes #24536 building nimble 0.16.4 fails when running build_all.sh (#24537) (cherry picked from commit 556f217b4cbebad0d8eabb1733fb1dcca46585ec) --- build_all.bat | 2 +- build_all.sh | 2 +- tools/ci_generate.nim | 2 +- tools/deps.nim | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build_all.bat b/build_all.bat index bef7956f28401..e4d8ec31e546e 100644 --- a/build_all.bat +++ b/build_all.bat @@ -26,4 +26,4 @@ if not exist %nim_csources% ( ) bin\nim.exe c --noNimblePath --skipUserCfg --skipParentCfg --hints:off koch koch boot -d:release --skipUserCfg --skipParentCfg --hints:off -koch tools --skipUserCfg --skipParentCfg --hints:off +koch tools --skipUserCfg --hints:off diff --git a/build_all.sh b/build_all.sh index 83848f41a1def..ddb8891a1f63c 100755 --- a/build_all.sh +++ b/build_all.sh @@ -13,5 +13,5 @@ nimBuildCsourcesIfNeeded "$@" echo_run bin/nim c --noNimblePath --skipUserCfg --skipParentCfg --hints:off koch echo_run ./koch boot -d:release --skipUserCfg --skipParentCfg --hints:off -echo_run ./koch tools --skipUserCfg --skipParentCfg --hints:off +echo_run ./koch tools --skipUserCfg --hints:off diff --git a/tools/ci_generate.nim b/tools/ci_generate.nim index a461be5915b94..a9635d02dbc92 100644 --- a/tools/ci_generate.nim +++ b/tools/ci_generate.nim @@ -44,7 +44,7 @@ proc genBuildExtras(echoRun, koch, nim: string): string = result = fmt""" {echoRun}{nim} c --noNimblePath --skipUserCfg --skipParentCfg --hints:off koch {echoRun}{koch} boot -d:release --skipUserCfg --skipParentCfg --hints:off -{echoRun}{koch} tools --skipUserCfg --skipParentCfg --hints:off +{echoRun}{koch} tools --skipUserCfg --hints:off """ proc genWindowsScript(buildAll: bool): string = diff --git a/tools/deps.nim b/tools/deps.nim index 6568de7ff2033..cc50cedb53a79 100644 --- a/tools/deps.nim +++ b/tools/deps.nim @@ -46,5 +46,7 @@ proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, proc updateSubmodules*(dir: string) = let oldDir = getCurrentDir() setCurrentDir(dir) - exec "git submodule update --init" - setCurrentDir(oldDir) + try: + exec "git submodule update --init" + finally: + setCurrentDir(oldDir) \ No newline at end of file