diff --git a/CHANGELOG.md b/CHANGELOG.md index 30f3a88..4a6cc54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,2 @@ -- ENHANCEMENT - - Update dependency mikefarah/yq to v4 +- BUGFIX + - Fix `yq` syntax after upgrade to v4 diff --git a/overlay/usr/bin/lhci b/overlay/usr/bin/lhci index 9063202..903501e 100755 --- a/overlay/usr/bin/lhci +++ b/overlay/usr/bin/lhci @@ -7,10 +7,10 @@ exec 5>&1 OUT=$(/usr/local/bin/lhci "$@" | tee /dev/fd/5) || ERROR=true if [ -f "$CONFIG" ] && echo "$OUT" | grep -q "Done running Lighthouse"; then - UPLOAD_TARGET=$(yq r "${CONFIG}" --defaultValue "" ci.upload.target) - UPLOAD_OUTPUT_DIR=$(yq r "${CONFIG}" --defaultValue "" ci.upload.outputDir) + UPLOAD_TARGET=$(yq e '.ci.upload.target' "${CONFIG}") + UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir' "${CONFIG}") - if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ -n "${UPLOAD_OUTPUT_DIR}" ] ; then + if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ "${UPLOAD_OUTPUT_DIR:-null}" != "null" ] ; then MANIFEST=${UPLOAD_OUTPUT_DIR%/}/manifest.json DIST="${LHCI_BASE_DIR%/}/${UPLOAD_OUTPUT_DIR%/}/dist" mkdir -p "${DIST}"