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

feat: Wrap the paramter values in a quote if the data type is a string #1211

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

PintoGideon
Copy link
Collaborator

Fixes #1123

@PintoGideon PintoGideon merged commit b310c94 into master Jun 14, 2024

modifiedParams.push({
name: pluginParameters[j].data.flag,
value: boolean ? "" : instanceParameters[i].data.value,
value: isBoolean ? " " : isString ? `'${value}'` : value,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding single quotes won't always work, e.g. what if value itself contains a single quote character?

I recommend using a library for this, e.g. https://www.npmjs.com/package/shlex

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.

Add Double Quotes to command line parameters wherever applicable
2 participants