ci: escape literal parens in Nushell publish-step strings #25

Merged
David merged 1 commit from fix/ci-nu-string-interp-parens into main 2026-05-29 01:24:09 +02:00
Owner

Problem

The v0.7.0 release build failed before publishing any artifact:

Checking for an existing release artifact at https://dev.a8n.run/api/packages/pandoras-box/generic/forgejo-cli/v0.7.0/fj-linux-x86_64
Error: nu::shell::external_command
  x External command failed
    x Command `HTTP` not found
 33 |   print $"No existing artifact (HTTP 404) - safe to publish write-once"

The FJ-24 publish steps build their log messages with Nushell interpolated strings ($"..."), where parentheses denote a subexpression. Literal text such as (HTTP 404), (HTTP 200), (write-once), and (ignoring 404) was parsed as a command invocation (HTTP, write-once, ignoring), so the step aborted.

Fix

Escape the literal parens as \( / \) in the messages that also interpolate a value (so ($url) and friends still expand), and drop the $ prefix on the one message that has no interpolation so it is a plain string. Applied identically to build-binary.yml and build-binary-windows.yml (8 strings total, 4 per file). No behavioral change beyond letting the steps run; the publish/dry-run logic is untouched.

Verification

Confirmed each fixed string parses and renders correctly under Nushell 0.112.2 (the runner version), e.g. [dry-run] WOULD upload (write-once) fj-linux-x86_64 to <url>. A repo-wide grep for unescaped parenthesized barewords inside $"..." interpolations now returns nothing.

Recommend re-running the failed v0.7.0 tag build once this is on main so the release artifacts publish.

## Problem The `v0.7.0` release build failed before publishing any artifact: ``` Checking for an existing release artifact at https://dev.a8n.run/api/packages/pandoras-box/generic/forgejo-cli/v0.7.0/fj-linux-x86_64 Error: nu::shell::external_command x External command failed x Command `HTTP` not found 33 | print $"No existing artifact (HTTP 404) - safe to publish write-once" ``` The FJ-24 publish steps build their log messages with Nushell interpolated strings (`$"..."`), where parentheses denote a subexpression. Literal text such as `(HTTP 404)`, `(HTTP 200)`, `(write-once)`, and `(ignoring 404)` was parsed as a command invocation (`HTTP`, `write-once`, `ignoring`), so the step aborted. ## Fix Escape the literal parens as `\(` / `\)` in the messages that also interpolate a value (so `($url)` and friends still expand), and drop the `$` prefix on the one message that has no interpolation so it is a plain string. Applied identically to `build-binary.yml` and `build-binary-windows.yml` (8 strings total, 4 per file). No behavioral change beyond letting the steps run; the publish/dry-run logic is untouched. ## Verification Confirmed each fixed string parses and renders correctly under Nushell 0.112.2 (the runner version), e.g. `[dry-run] WOULD upload (write-once) fj-linux-x86_64 to <url>`. A repo-wide grep for unescaped parenthesized barewords inside `$"..."` interpolations now returns nothing. Recommend re-running the failed `v0.7.0` tag build once this is on `main` so the release artifacts publish.
ci: escape literal parens in Nushell publish-step strings
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 36s
Create release / Create release from merged PR (pull_request) Has been skipped
f04dc59614
The FJ-24 publish steps build log messages with Nushell interpolated strings (`$"..."`), where parentheses denote a subexpression. Literal text like `(HTTP 404)`, `(HTTP 200)`, `(write-once)`, and `(ignoring 404)` was therefore parsed as a command invocation, so the `v0.7.0` release build aborted with `Command 'HTTP' not found` before publishing the artifact.

Escape the literal parens as `\(` / `\)` in strings that also interpolate a value (so `($url)` and friends still expand), and drop the `$` prefix on the one message with no interpolation so it is a plain string. Applied identically to both build-binary.yml and build-binary-windows.yml. Verified the rendered output under Nushell 0.112.2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
David merged commit 08c67b2664 into main 2026-05-29 01:24:09 +02:00
David deleted branch fix/ci-nu-string-interp-parens 2026-05-29 01:24:09 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/forgejo-cli!25
No description provided.