Skip to content

Commit

Permalink
fix(rust): clean up +EXECUTE
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj committed May 8, 2024
1 parent f1238b9 commit 324689e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions earthly/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,11 @@ EXECUTE:
# We then check the existence of the "fail" file after any artifacts are saved that
# should be saved regardless.
RUN --mount=$EARTHLY_RUST_CARGO_HOME_CACHE --mount=$EARTHLY_RUST_TARGET_CACHE \
env | grep EARTHLY; \
set +e; \
rm -f fail; \
$cmd $args1 $args2 $args3 $args4 $args5 $args6 ; \
if [ $? -ne 0 ]; then \
touch fail; \
fi \
$cmd $args1 $args2 $args3 $args4 $args5 $args6 || touch fail; \
cargo sweep -r -t $EARTHLY_SWEEP_DAYS; \
cargo sweep -r -i; \
cargo sweep -r -i


# We always want to save these (if requested) even if the command fails.
Expand Down Expand Up @@ -243,6 +239,8 @@ CARGO:
ARG --required args
ARG output
ARG ALLOW_DEBUG_TARGET="false"
ARG junit
ARG coverage
ARG docs="false"

DO +EXECUTE \
Expand Down

0 comments on commit 324689e

Please sign in to comment.