Skip to content

Commit fe4b6f7

Browse files
committed
fix(get-package-manager): use clean bash code
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 1c24fb2 commit fe4b6f7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

actions/get-package-manager/action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ runs:
2626
shell: bash
2727
run: |
2828
# Yarn
29-
if [[ -f "yarn.lock" ]]; then
30-
echo "package-manager=yarn" >> $GITHUB_OUTPUT
31-
echo "cache-dependency-path=**/yarn.lock" >> $GITHUB_OUTPUT
32-
echo "install-command=yarn install --frozen-lockfile" >> $GITHUB_OUTPUT
33-
echo "run-script-command=yarn" >> $GITHUB_OUTPUT
29+
if [ -f "yarn.lock" ]; then
30+
echo "package-manager=yarn" >> "$GITHUB_OUTPUT"
31+
echo "cache-dependency-path=**/yarn.lock" >> "$GITHUB_OUTPUT"
32+
echo "install-command=yarn install --frozen-lockfile" >> "$GITHUB_OUTPUT"
33+
echo "run-script-command=yarn" >> "$GITHUB_OUTPUT"
3434
exit 0
3535
fi
3636
3737
# NPM
38-
if [[ -f "package-lock.json" ]]; then
39-
echo "package-manager=npm" >> $GITHUB_OUTPUT
40-
echo "cache-dependency-path=**/package-lock.json" >> $GITHUB_OUTPUT
41-
echo "install-command=npm ci" >> $GITHUB_OUTPUT
42-
echo "run-script-command=npm run" >> $GITHUB_OUTPUT
38+
if [ -f "package-lock.json" ]; then
39+
echo "package-manager=npm" >> "$GITHUB_OUTPUT"
40+
echo "cache-dependency-path=**/package-lock.json" >> "$GITHUB_OUTPUT"
41+
echo "install-command=npm ci" >> "$GITHUB_OUTPUT"
42+
echo "run-script-command=npm run" >> "$GITHUB_OUTPUT"
4343
exit 0
4444
fi
4545

0 commit comments

Comments
 (0)