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: improve windows support #13

Merged
merged 1 commit into from
May 3, 2024

Conversation

lemire
Copy link
Collaborator

@lemire lemire commented May 3, 2024

This might help a little bit.

// Passing "--help "sdfsd"" to a batch script
// will be considered as a single argument made
// of --help "sdfsd". However, there are corner cases.
std::string escaped = "\"" + escaped + "\"";
Copy link
Owner

Choose a reason for hiding this comment

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

We need to also escape " characters with \" and update cctest/node_task_runner.cc file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to also escape " characters with "

Do you have a reference that says so? I don't think it works this way:

https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter

Copy link
Owner

Choose a reason for hiding this comment

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

That's nice. TIL. Can you also update cctest/node_task_runner.cc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did update it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@anonrig

So "Tim says, ""Hi!""" and "Tim says, "Hi!"" become Tim says, "Hi!". There is a fairly complex algorithm that spans quite a few paragraphs.

@lemire lemire merged commit e195b4d into anonrig:fix-positional-args May 3, 2024
21 of 23 checks passed
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.

2 participants