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

quote progress args #142

Merged
merged 1 commit into from
Mar 30, 2017
Merged

quote progress args #142

merged 1 commit into from
Mar 30, 2017

Conversation

mapsam
Copy link
Member

@mapsam mapsam commented Mar 30, 2017

Arguments using the watchbot-progress.sh command that included spaces in a JSON value were misinterpreted as multiple arguments. Here's an example:

metadata='{"hello":"i have a space"}'
output=$(watchbot-progress set-metadata --parts $parts --metadata "$metadata")

This results in an incomplete JSON being sent to the actual watchbot-progress script, and the following error:

{"hello":"i
                                                          

SyntaxError: Unexpected end of input

Wrapping the $@ in quotes, "$@" resolves the issue by preserving strings with spaces.

cc @rclark @springmeyer

@mapsam mapsam requested a review from rclark March 30, 2017 18:13
@rclark
Copy link
Contributor

rclark commented Mar 30, 2017

Awesome @mapsam -- thanks for tracking this down.

@mapsam mapsam merged commit be2fd4b into master Mar 30, 2017
@mapsam mapsam deleted the quote-progress-args branch March 30, 2017 19:42
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.

None yet

2 participants