Jump to content
shira

No notification after system command

Recommended Posts

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?

 

Share this post


Link to post

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 by deanishe

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...