Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"syntax error: invalid arithmetic operator" in log after npm publish #417

Closed
1 task done
mbtools opened this issue Feb 5, 2024 · 1 comment · Fixed by #436
Closed
1 task done

"syntax error: invalid arithmetic operator" in log after npm publish #417

mbtools opened this issue Feb 5, 2024 · 1 comment · Fixed by #436
Labels

Comments

@mbtools
Copy link

mbtools commented Feb 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The "Release Integration > Publish" action includes the npm publish command. The corresponding action log contains the following error:

/home/runner/work/_temp/570d07ac-66bd-47e2-805d-030313533c8a.sh: line 14: [[: + semver@7.6.0
0: syntax error: invalid arithmetic operator (error token is "@7.6.0
0")

Example:

https://github.com/npm/node-semver/actions/runs/7788106733/job/21236934252

image

Expected Behavior

No error in log

Steps To Reproduce

Run "Release Integration > Publish" workflow

https://github.com/npm/node-semver/blob/main/.github/workflows/release-integration.yml

Environment

  • github.com
@mbtools mbtools added the Needs Triage needs an initial review label Feb 5, 2024
@lukekarrys
Copy link
Contributor

Good catch! We are trying to run npm publish and log the output but only return the exit code from a bash function. The rest of the output is being returned from the function as well, and that's what bash is erroring on.

Right now I think even if npm publish were to fail, this works as expected because there won't be anything on stdout in that case. But we should still clean up this script so it doesnt report those syntax errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants