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

Use an array instead of string for command #15

Merged
merged 1 commit into from Apr 14, 2016

Conversation

Projects
None yet
2 participants
@fcoelho
Contributor

fcoelho commented Apr 8, 2016

Using an array makes it unecessary to escape strings for arguments,
as the child process receives each element in the string as a separate
argument regardless of its contents.

I have to use printers that are accessible via USB and have URIs with characters such as "&". Instead of trying to quote everything, this just sends the strings as arguments directly, no quoting needed anywhere.

Use an array instead of string for command
Using an array makes it unecessary to escape strings for arguments,
as the child process receives each element in the string as a separate
argument regardless of its contents.
@jaredk-beta

This comment has been minimized.

Show comment
Hide comment
@jaredk-beta

jaredk-beta Apr 14, 2016

Contributor

All tests passed on my end. Merging this in.

Contributor

jaredk-beta commented Apr 14, 2016

All tests passed on my end. Merging this in.

@jaredk-beta jaredk-beta merged commit 5bd8f16 into artem-sidorenko:master Apr 14, 2016

@fcoelho fcoelho deleted the fcoelho:command-array branch Apr 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment