bwoodruff Posted January 17, 2021 Share Posted January 17, 2021 Hello, I'm trying to build a fairly simple workflow that: 1. Finds all private SSH keys in the ~/.ssh director 2. Runs `ssh-add -K` on each of them 3. Sends the output of the commands run to a notification Here is what I have: The problem I'm having is that `{query}` appears to be blank after the script runs as the notification title says "ssh-add" as intended, but the text of the notification is blank. Can anyone help please? Thank you. Ben Link to comment
Andrew Posted January 18, 2021 Share Posted January 18, 2021 @bwoodruff try adding a debug utility object before the Post Notification to see what {query} is actually set to (i.e. what you're actually getting out of your run script). You can show Alfred's workflow debugger with the little bug icon in the top right of the workflow editor. It could be something simple like the output needing to be trimmed. Link to comment
deanishe Posted January 18, 2021 Share Posted January 18, 2021 15 hours ago, bwoodruff said: Can anyone help please? Are you sure ssh-add writes to STDOUT, not STDERR? Check Alfred's debugger to see if the output you're expecting is in there (STDERR). Link to comment
bwoodruff Posted January 18, 2021 Author Share Posted January 18, 2021 Ah! Okay, it was outputting to STDERR. Adding 2>&1 fixed the problem. Thank you both!! Link to comment
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