From 690961bad15c673f9f8f13f416b4c8d6b941031b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:15:41 +0000 Subject: [PATCH 1/2] Initial plan From b6bab7409696071eeb99c6d8f32bcb21aa735036 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:23:37 +0000 Subject: [PATCH 2/2] fix: fix action.yml config arg passing to avoid literal quotes in path The CONFIG env var was constructed with embedded quotes: format(' --config \"{0}\"', inputs.config) When bash expanded $CONFIG unquoted, the path became '".github/version.yml"' (with literal double-quote characters), which doesn't exist on disk. Since the config path was non-empty, post.ts didn't fall back to the default path, so hooks were never invoked. Fix: pass raw values through env vars and use bash arrays with conditionals to construct arguments safely, as suggested in the issue. Agent-Logs-Url: https://github.com/Optum/semver-cli/sessions/5bc2ff24-fbec-44e7-a3de-97e9254885be Co-authored-by: justinmchase <10974+justinmchase@users.noreply.github.com> --- action.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 5b7ca8f..61b93bb 100644 --- a/action.yml +++ b/action.yml @@ -96,12 +96,19 @@ runs: name: Run Semver ${{ inputs.command }} shell: bash run: | - semver $COMMAND $SUB_COMMAND $VALUE $COMPARE_TO $PRERELEASE $BUILD $CONFIG + ARGS=("$COMMAND") + [[ -n "$SUB_COMMAND" ]] && ARGS+=("$SUB_COMMAND") + [[ -n "$VALUE" ]] && ARGS+=("$VALUE") + [[ -n "$COMPARE_TO" ]] && ARGS+=("$COMPARE_TO") + [[ -n "$PRERELEASE" ]] && ARGS+=("--prerelease" "$PRERELEASE") + [[ -n "$BUILD" ]] && ARGS+=("--build" "$BUILD") + [[ -n "$CONFIG" ]] && ARGS+=("--config" "$CONFIG") + semver "${ARGS[@]}" env: COMMAND: "${{ inputs.command }}" SUB_COMMAND: "${{ inputs.sub-command }}" - VALUE: "${{ inputs.value && format(' {0}', inputs.value) || '' }}" - COMPARE_TO: "${{ inputs.compare-to && format('{0}', inputs.compare-to) || '' }}" - PRERELEASE: "${{ inputs.prerelease && format('--prerelease {0}', inputs.prerelease) || '' }}" - BUILD: "${{ inputs.build && format(' --build {0}', inputs.build) || '' }}" - CONFIG: "${{ inputs.config && format(' --config \"{0}\"', inputs.config) || '' }}" + VALUE: "${{ inputs.value }}" + COMPARE_TO: "${{ inputs.compare-to }}" + PRERELEASE: "${{ inputs.prerelease }}" + BUILD: "${{ inputs.build }}" + CONFIG: "${{ inputs.config }}"