JetBrains / JetBrains/writerside-github-action

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

Open Beginner friendly
#33 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
84
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## 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`:

```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 ""`.

## Reproduction

`writerside.cfg`:

```xml

```

Workflow:

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

## Result

```
Product locator "Savvy" must use / 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`

Contributor guide

Open the contributing guide

Research direction

Start in dist/index.js where instanceParam is assembled and then interpolated into the bash -c command. Reproduce with the provided writerside.cfg module and workflow input, then verify that Savvy Position Label/pl reaches the builder as one argument and the build succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, docker, javascript
Domain
build-system, ci-cd, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.