Skip to content
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

Implications of running task with shell? #31

Closed
connerxyz opened this issue Jun 22, 2021 · 2 comments
Closed

Implications of running task with shell? #31

connerxyz opened this issue Jun 22, 2021 · 2 comments

Comments

@connerxyz
Copy link

I've needed to define a poe task that strings together shell commands with &&.

{ shell = "foo && bar && ..." }

How is this different from the non-shell (?) poe tasks? What should I be aware of when distributing to other devs on my team (e.g., will it break if they have a different shell... just spitballing this)?

@nat-n
Copy link
Owner

nat-n commented Jun 22, 2021

Hi @connerxyz,

At a low level the difference is that cmd uses subprocess.Popen more or less directly with what you give it (with some preprocessing to resolve env variables), whereas shell tasks actually invoke a specific shell process to interpret what you give it. In general this shell should be assumed to be bash, which means that if there is no bash in the local environment then it will fail.

Of course on windows this gets a little complicated since bash isn't a standard part of the environment, so poe will do its best to find bash on the path, or where git bash is usually found.

There are a few edge cases that need improvement, see #27 #15

@nat-n
Copy link
Owner

nat-n commented Aug 23, 2021

Closing stale issue with no defined action points.

@nat-n nat-n closed this as completed Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants