Skip to content

Module names containing a space break the build: instance input is interpolated into a shell command unquoted #33

Description

@jbenghiat

Summary

The instance input is spliced into a bash -c command string without quoting, so any module name containing a space is word-split and the build fails.

dist/index.js:

instanceParam = `-product ${instance}`;

…which is then interpolated into:

/opt/builder/bin/idea.sh helpbuilderinspect -source-dir ${workingDirectory}/${location} ${instanceParam} …

and run via docker … /bin/bash -c "<that string>".

Reproduction

writerside.cfg:

<module name="Savvy Position Label"/>

Workflow:

- uses: JetBrains/writerside-github-action@v4
  with:
    instance: Savvy Position Label/pl
    docker-version: '2026.08.0328'

Result

Product locator "Savvy" must use <module>/<product> format.
Test existing artifacts
Artifacts not found

-product receives only Savvy; Position and Label/pl become stray arguments.

Why it is worth fixing

Writerside itself accepts spaces in module names — the IDE builds this project fine, and the documented MODULE_INSTANCE env-var invocation of the builder image handles Savvy Position Label/pl correctly, because Docker passes it as a single argument rather than through a shell.

The action is the only place the space is fatal, and the error message names neither the input nor the space, so it reads as a malformed locator rather than a quoting problem. It took a while to trace back to the action.

Suggested fix

Quote the interpolation, or pass the value to the container as an environment variable instead of embedding it in the shell string.

Workaround

Rename the module so it contains no spaces. Pre-quoting the input as "'Savvy Position Label/pl'" also works, but only because the value is currently interpolated raw — it would break if quoting were added.

Environment

  • JetBrains/writerside-github-action@v4
  • docker-version: 2026.08.0328
  • ubuntu-latest

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions