-
Notifications
You must be signed in to change notification settings - Fork 111
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
Use of sh -i
in desk run causes process suspension in pipelines
#86
Comments
The following patch addresses this, but it breaks the alias test. --- desk
+++ desk
@@ -141,9 +141,9 @@ cmd_go() {
cmd_run() {
local TODESK="$1"
shift;
if [ $# -eq 1 ]; then
- cmd_go "$TODESK" -ic "$1"
+ cmd_go "$TODESK" -c ". \$DESK_ENV; $1"
else
- cmd_go "$TODESK" -ic '"$@"' -- "$@"
+ cmd_go "$TODESK" -c '. $DESK_ENV; "$@"' -- "$@"
fi
} |
One way to make aliases work would be to use the load code in #80, and couple it with a shell function that handles run in a subshell (using parens, not I guess this could still probably break somebody's workflow somewhere. Not hard to fix, but maybe not fun to trip over. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This makes desk unusable in some pipelines (or any pipelines if you don't like guessing).
This is a little complicated to reproduce. For instance, changing the first command from
ls
toseq 10
usually succeeds. I'm not sure what the reason is here, but it is likely related to the fact thatseq
can produce output sooner thanls
.Or, if run with no controlling tty, we get warnings but the pipeline is otherwise functional.
I think this all has something to do with multiple shells trying to manage the foreground process on the terminal. This can be avoided if
desk run
stops using the-i
flag and simply injects. $DESK_ENV;
in front of the command to run.The text was updated successfully, but these errors were encountered: