fix: Prevent word splitting in compilation scripts when handling paths (#1502)
These invocations will all cause bugs when pwd returns something that can be interpreted by bash, the most common case being a folder with whitespaces in its name. In other words these can be triggered by calling the scripts from any folder that contains whitespaces. More info on this specific finding by shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2046
This commit is contained in:
@@ -48,7 +48,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir output && \
|
||||
tools/build-companion-nightly.sh $(pwd) $(pwd)/output/
|
||||
tools/build-companion-nightly.sh "$(pwd)" "$(pwd)/output/"
|
||||
|
||||
- name: Compose release filename
|
||||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
||||
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir output && \
|
||||
tools/build-companion-nightly.sh $(pwd) $(pwd)/output/
|
||||
tools/build-companion-nightly.sh "$(pwd)" "$(pwd)/output/"
|
||||
|
||||
- name: Compose release filename
|
||||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
||||
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
run: |
|
||||
mkdir output && \
|
||||
CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \
|
||||
tools/build-companion-nightly-win32.sh $(pwd) $(pwd)/output/
|
||||
tools/build-companion-nightly-win32.sh "$(pwd)" "$(pwd)/output/"
|
||||
- name: Compose release filename
|
||||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
||||
run: echo "artifact_name=edgetx-cpn-win-32-${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
run: |
|
||||
mkdir output && \
|
||||
CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \
|
||||
tools/build-companion-nightly.sh $(pwd) $(pwd)/output/
|
||||
tools/build-companion-nightly.sh "$(pwd)" "$(pwd)/output/"
|
||||
|
||||
- name: Compose release filename
|
||||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ if [[ -n ${GCC_ARM} ]] ; then
|
||||
export PATH=${GCC_ARM}:$PATH
|
||||
fi
|
||||
|
||||
: ${SRCDIR:=$(dirname $(pwd)/"$0")/..}
|
||||
: ${SRCDIR:=$(dirname "$(pwd)/$0")/..}
|
||||
|
||||
: ${BUILD_TYPE:=Release}
|
||||
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_RULE_MESSAGES=OFF -DDISABLE_COMPANION=YES -Wno-dev "}
|
||||
|
||||
@@ -46,7 +46,7 @@ if [[ -n ${GCC_ARM} ]] ; then
|
||||
export PATH=${GCC_ARM}:$PATH
|
||||
fi
|
||||
|
||||
: ${SRCDIR:=$(dirname $(pwd)/"$0")/..}
|
||||
: ${SRCDIR:=$(dirname "$(pwd)/$0")/..}
|
||||
|
||||
: ${BUILD_TYPE:=Debug}
|
||||
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -Wno-dev "}
|
||||
|
||||
@@ -10,7 +10,7 @@ if [[ -n ${GCC_ARM} ]] ; then
|
||||
fi
|
||||
|
||||
: ${FLAVOR:="t12;t8;tlite;tpro;tx12;zorro;tx16s;x12s;nv14;x7;x9d;x9dp;x9e;x9lite;x9lites;xlite;xlites"}
|
||||
: ${SRCDIR:=$(dirname $(pwd)/"$0")/..}
|
||||
: ${SRCDIR:=$(dirname "$(pwd)/$0")/..}
|
||||
|
||||
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_RULE_MESSAGES=OFF -DDISABLE_COMPANION=YES -Wno-dev -DYAML_STORAGE=YES "}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user