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

Fix argument handling with spaces in neu run #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rahulptl165
Copy link

Fixes #279

Description:

This PR addresses an issue in the Neutralinojs CLI where arguments containing spaces (e.g., file paths) were being split into multiple parameters. This is particularly problematic when using the neu run command with arguments like --file="path with spaces.txt", which were incorrectly processed into separate arguments.

Changes Made:

  • Modified the argument parsing logic in the run.js file to properly handle parameters with spaces.
  • Ensured that all arguments after -- are treated as a single string, preserving spaces where needed.

How It Works:

  • The PR introduces logic to properly join the arguments passed after -- into a single string, ensuring that the entire argument, including paths with spaces, is passed correctly to the application.

Test:

  • Created a test Neutralinojs project and used the following command to verify that arguments with spaces are handled correctly.

  • my input

neu run -- --file="path with spaces.txt"
  • outcome
neu: INFO Starting process: neutralino-win_x64.exe  --load-dir-res --path=. --export-auth-info --neu-dev-extension --neu-dev-auto-reload 
"--file=path with spaces.txt"
neu: INFO neu CLI connected with the application.

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

Successfully merging this pull request may close these issues.

NL_ARGS cannot handle spaces when using neu run
1 participant