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
Shell script evidence stopped working with 1.6.3 #443
Comments
The evidence source hasn't changed in 11 months...can you try http://www.controlplaneapp.com/download/1.6.2 and see if it starts working again? |
I tried. It's working in 1.6.1 but it's not working in either 1.6.2 or 1.6.3 |
Yes, 1.6.1 has the sparkle issue. 1.6.2+ are the only versions compiled on newer versions of Xcode so I'm guessing that's the issue. |
I have the same issue. The scripts are called, but the results never interpreted as true. |
I just pushed an update, try it and let me know if it's working better for you now. |
Thank you for the update. Unfortunately still not working on my side. Script is called without an error but always returned as false. |
I'm seeing the same behavior (Shell script evidence sources work in 1.6.1, broken in 1.6.2, semi-functional in 1.6.4). In my case, the script in question that was working is run with the applescript interpreter: with an error or return line, which then returns 1 or 0 to the shell as verified with echo $? after calling the script. To test, I then created two bash scripts that return 0 or 1:
1.6.1: Works (first script returns true in evidence sources, second one is false) |
1.6.2 simply doesn't work, this is confirmed. Apple clearly changed the behavior of NSTask but it isn't documented. Using echo |
Thanks for the hint. Just in case others are running into issues with applescripts used as evidence sources, I was able to workaround this with the following (assuming shouldExit indicates whether the output of the script should fail): 1.6.1 and earlier, I could exit an applescript and have it interpreted as success or failure like this:
With 1.6.2+, I can workaround with the following change:
Is this something that should be filed with Apple? |
Thanks @dustinrue for the info and @ericpruett for the tip. @dustinrue Perhaps the info in the interface could be changed to reflect the change in behavior. |
I also just noticed that |
I have the same problem. I can't get Shell scripts to execute either, they bomb out with (script terminated with a non-zero status '127'). I use zsh. |
At the top of your script you adding #!/bin/zsh? |
Thanks @dustinrue, I tried this and now it works, but it seems like the path is not being loaded. Eg my command fails unless I run /usr/local/bin/vagrant, while if I run the script normally, vagrant by itself is enough. |
I'm not surprised. I'm almost positive the scripts are run through bash specifically so your environment isn't going to be loaded when you ask bash to run zsh to run your script. What you can do is, after the #!/bin/zsh, is source your zsh environment files. |
As reported by another user on the google groups the shell script evidence source seems to be broken with the recent update. My script was working perfectly until recent 1.6.3 update and stopped returning a positive result when true:
Thanks for your support!
The text was updated successfully, but these errors were encountered: