fix(workflows): cargo wrapper should try to source .cargo/env if it exists

This commit is contained in:
Alex Zenla 2024-07-25 01:58:25 -07:00
parent 510933c081
commit a4a708fa98
No known key found for this signature in database
GPG Key ID: 067B238899B51269
2 changed files with 10 additions and 1 deletions

View File

@ -199,6 +199,10 @@ jobs:
- name: install ${{ matrix.platform.deps }} dependencies
run: ./hack/ci/install-${{ matrix.platform.deps }}-deps.sh
- name: dump env
run: env
run: |
env
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ matrix.platform.os == 'darwin' }}
- name: cargo build kratactl
run: ./hack/build/cargo.sh build --bin kratactl

View File

@ -15,5 +15,10 @@ then
fi
fi
if ! command -v cargo > /dev/null && [ -f "${HOME}/.cargo/env" ]
then
. "${HOME}/.cargo/env"
fi
export CARGO_BUILD_TARGET="${RUST_TARGET}"
exec "${CARGO}" "${@}"