Skip to content

Commit 5dd156c

Browse files
committed
Do not override value of an already set environment variable
1 parent 0b8aa5e commit 5dd156c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,23 @@ runs:
8585

8686
- run: |
8787
: disable incremental compilation
88-
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
88+
if [ -z ${CARGO_INCREMENTAL+set} ]; then
89+
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
90+
fi
8991
shell: bash
9092
9193
- run: |
9294
: enable colors in Cargo output
93-
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
95+
if [ -z ${CARGO_TERM_COLOR+set} ]; then
96+
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
97+
fi
9498
shell: bash
9599
96100
- run: |
97101
: enable Cargo sparse registry # ignored by stable cargo
98-
echo CARGO_UNSTABLE_SPARSE_REGISTRY=true >> $GITHUB_ENV
102+
if [ -z ${CARGO_UNSTABLE_SPARSE_REGISTRY+set} ]; then
103+
echo CARGO_UNSTABLE_SPARSE_REGISTRY=true >> $GITHUB_ENV
104+
fi
99105
shell: bash
100106
101107
- run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose

0 commit comments

Comments
 (0)