shira Posted December 19, 2015 Posted December 19, 2015 I have a simple keyword script that parses some arguments in Ruby and then uses `curl` to submit to a url (a Google Form). All works as advertised, including error messages after rescued Exceptions, except that I get no notification from any output in my script that occurs *after* the `curl` command. Examples: # works correctly and echoes notification puts "Completed successfully!" `curl --data #{data} #{url}` # does not echo notification `curl --data #{data} #{url}` puts "Completed successfully!" In the second case, no notification ever gets issued. If I run the script from the command line, the final "Completed successfully" line is successfully sent to STDOUT after curl returns. Any idea why this should be the case?
deanishe Posted December 20, 2015 Posted December 20, 2015 (edited) cURL write its output to STDOUT by default. It's possible that its output is interfering with the notification (e.g. Alfred registers a blank line and ignores it.)Try redirecting cURL's output: curl ... > /dev/null. Edited December 22, 2015 by deanishe
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now