Skip to content

Commit

Permalink
Rust: Echo cargo $args into the logs
Browse files Browse the repository at this point in the history
The logs otherwise just contain:
```
--> RUN set -e; cargo $args; cargo sweep -r -t $EARTHLY_SWEEP_DAYS; cargo sweep -r -i; $EARTHLY_FUNCTIONS_HOME/copy-output.sh "$output";
```

which doesn't show what is actually being run.
  • Loading branch information
ijc committed Aug 16, 2024
1 parent 2d37277 commit 919b55d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ CARGO:
END
RUN --mount=$EARTHLY_RUST_CARGO_HOME_CACHE --mount=$EARTHLY_RUST_TARGET_CACHE \
set -e; \
echo "+CARGO: cargo $args"; \
cargo $args; \
if [ "$EARTHLY_DO_NOT_CACHE_PATH_BASED_DEPENDENCIES" = "true" ]; then \
cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.id | startswith("path+file://")) | .name' | xargs -I{} cargo clean -p {}; \
fi; \
echo "+CARGO: sweeping target cache"; \
cargo sweep -r -t $EARTHLY_SWEEP_DAYS; \
cargo sweep -r -i; \
echo "+CARGO: copying output"; \
$EARTHLY_FUNCTIONS_HOME/copy-output.sh "$output";
RUN $EARTHLY_FUNCTIONS_HOME/rename-output.sh "$output"

Expand Down

0 comments on commit 919b55d

Please sign in to comment.