From 3742a288d18f91a7f2a80fa8284944a89556c4f3 Mon Sep 17 00:00:00 2001 From: Lucas Caudill Date: Mon, 6 May 2024 19:09:54 +0000 Subject: [PATCH] =?UTF-8?q?oops=20=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/ch_misc.h | 2 +- lib/build.py | 4 +++- test/common.bash | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/ch_misc.h b/bin/ch_misc.h index c8b571fc2..8eee99d1f 100644 --- a/bin/ch_misc.h +++ b/bin/ch_misc.h @@ -24,7 +24,7 @@ don’t need to worry about running out of room. */ #define WARNINGS_SIZE (4*1024) -/* Exit codes (see also: test/common.bash). */ +/* Exit codes (see also: test/common.bash, lib/build.py). */ #define ERR_CHRUN 31 #define ERR_CMD 49 #define ERR_SQUASH 84 diff --git a/lib/build.py b/lib/build.py index 55acfc5a4..728825ed4 100644 --- a/lib/build.py +++ b/lib/build.py @@ -331,7 +331,9 @@ def modify(cli_): bu.cache.branch_nocheckout(src_image.ref, out_image.ref) foo = subprocess.run([ch.CH_BIN + "/ch-run", "--unsafe", "-w", str(out_image.ref), "--", shell]) - if (foo.returncode == 58): + # FIXME: This causes issues when you change the value in ch_misc.h and + # forget to change it here... + if (foo.returncode == 49): # FIXME: Write a better error message? ch.FATAL("Unable to run shell: %s" % shell) ch.VERBOSE("using SID %s" % fake_sid) diff --git a/test/common.bash b/test/common.bash index b5e48595d..4b17a4281 100644 --- a/test/common.bash +++ b/test/common.bash @@ -329,7 +329,7 @@ chmod 700 "$btnew" export BATS_TMPDIR=$btnew [[ $(stat -c %a "$BATS_TMPDIR") = '700' ]] -# ch-run exit codes. (see also: ch_misc.h) +# ch-run exit codes. (see also: ch_misc.h, lib/build.py) CH_ERR_RUN=31 CH_ERR_CMD=49 CH_ERR_SQUASH=84 # Currently not used, here just in case