Skip to content

Commit

Permalink
fix cache id
Browse files Browse the repository at this point in the history
  • Loading branch information
idelvall committed Dec 8, 2023
1 parent 9bf8e8f commit ff920c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ CARGO:
# Notice that in order to run this function, +INIT must be called first. This function exports the target cache mount ID under the env entry: $TARGET_CACHE_ID.
# Arguments:
# - command (required): Command to run, can be any expression.
# - cargo_home_cache_id: ID of the cargo home cache mount. By default: $CARGO_HOME_CACHE_ID as exported by +INIT
# - target_cache_id: ID of the target cache mount. By default: ${CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}
# - EARTHLY_CARGO_HOME_CACHE_ID: ID of the cargo home cache mount. By default: $EARTHLY_CARGO_HOME_CACHE_ID as exported by +INIT
# - target_cache_id: ID of the target cache mount. By default: ${EARTHLY_CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}
#
RUN_WITH_CACHE:
COMMAND
DO +CHECK_INITED
ARG --required command
ARG EARTHLY_TARGET_NAME
ARG cargo_home_cache_id = $CARGO_HOME_CACHE_ID
ARG target_cache_id="${CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}"
ARG cargo_home_cache_id = $EARTHLY_CARGO_HOME_CACHE_ID
ARG target_cache_id="${EARTHLY_CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}"
# Save to restore at the end.
ARG ORIGINAL_CARGO_HOME=$CARGO_HOME
ARG ORIGINAL_CARGO_INSTALL_ROOT=$CARGO_INSTALL_ROOT
Expand Down

0 comments on commit ff920c6

Please sign in to comment.