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

Colon in swa-cli.config.json configuration.run value causing field to not be read #782

Open
1 of 3 tasks
jag43 opened this issue Nov 13, 2023 · 1 comment
Open
1 of 3 tasks

Comments

@jag43
Copy link

jag43 commented Nov 13, 2023

Before filing this issue, please ensure you're using the latest CLI by running swa --version and comparing to the latest version on npm.

swa -v
1.1.6

Are you accessing the CLI from the default port :4280 ?

  • No, I am using a different port number (--port) and accessing the CLI from that port
  • Yes, I am accessing the CLI from port :4280
  • N/A

Make sure you are accessing the URL printed in the console when running swa start!

ℹ️ NOTE: Make sure to enable debug logs when running any swa commands using --verbose=silly

Describe the bug

configuration.run value does not seem to be picked up correctly if the value contains a colon (:)

To Reproduce

I can see this in options.run with --print-config but it doesn't seem to get passed on to SWA_CLI_STARTUP_COMMAND when checking -V=silly:

I set a run value in swa-cli-config.json like this:

"run": "npm run dev:admin",
- SWA_CLI_STARTUP_COMMAND:

If I remove the colon

"run": "npm run dev",
- SWA_CLI_STARTUP_COMMAND: npm run dev

Expected behavior

I expect the value with the colon to be read om correctly

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 22H2

Additional context
I made a minimal repro here https://github.com/jag43/swa-repro
You can see the different behaviour with

swa start --config-name swa-repro-colon --print-config -V=silly

and

swa start --config-name swa-repro-no-colon --print-config -V=silly
@cjk7989
Copy link
Contributor

cjk7989 commented Nov 14, 2023

Thanks for your feedback. I can reproduce the issue and will fix it in the next release.

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

No branches or pull requests

2 participants