Skip to content

Commit 29c172b

Browse files
committed
ci: fix GitHub Action
It look like the variable may be uninitialized ...sh: line 11: [: -ne: unary operator expected ...sh: line 11: [: -ne: unary operator expected Lockfile ./Cargo.lock is dirty Error: Process completed with exit code 1. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent a0d0487 commit 29c172b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/deny_dirty_cargo_locks.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ jobs:
1111
with:
1212
ref: ${{ github.event.pull_request.head.sha }}
1313

14-
- name: "Check no Cargo.lock files are dirty"
14+
- name: "Check no Cargo.lock files are dirty"
1515
run: |
1616
exit_code=0
17+
is_dirty=0
1718
# This breaks for paths with whitespaces in them, but we have an integration test
1819
# that prevents those from existing in this repository.
1920
for f in $(find . -name 'Cargo.lock' -not -path "./build/*"); do
2021
(
2122
cd "$(dirname "$f")"
2223
cargo --locked metadata --format-version 1 >/dev/null 2>&1
23-
) || is_dirty=$?;
24+
) || is_dirty=$?;
2425
# GitHub Actions execute run steps as `bash -e`, so we need the temporary
2526
# variable to not exit early.
2627
if [ $is_dirty -ne 0 ]; then

0 commit comments

Comments
 (0)