Skip to content

Commit 38ef594

Browse files
committed
fix: resolve E2E workflow compilation and PATH issues
- Add missing 'dirs' dependency to Cargo.toml (used in e2e_tests.rs) - Fix sudo PATH issue by preserving PATH environment variable - Ensures cargo command is accessible when running with sudo privileges This resolves the 'cargo: command not found' error in GitHub Actions.
1 parent 7ede027 commit 38ef594

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ jobs:
7575
- name: Run wait-cloud-init E2E test
7676
run: |
7777
# Run the E2E test with verbose output for better debugging
78-
# Use sudo -E to preserve environment variables for OpenTofu/LXD access
79-
sudo -E cargo run --bin e2e-tests -- wait-cloud-init --verbose
78+
# Use sudo -E and preserve PATH to ensure cargo is accessible
79+
sudo -E env "PATH=$PATH" cargo run --bin e2e-tests -- wait-cloud-init --verbose
8080
env:
8181
# Preserve environment variables for the E2E test
8282
RUST_LOG: debug

0 commit comments

Comments
 (0)