Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
oops 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaudill committed May 6, 2024
1 parent b37232b commit 3742a28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/ch_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3742a28

Please sign in to comment.