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

The way to go: Allow complex shell commands in the shell task #100

Open
wants to merge 1 commit into
base: epic/gh-33-the-way-to-go
Choose a base branch
from

Conversation

xulongwu4
Copy link
Contributor

This PR changes the way in which commands in a shell task are executed. It runs a cmd command in a shell task by invoking $SHELL -c cmd. This is also how shell commands were executed in the python implementation.

Pros of using $SHELL -c cmd to execute a cmd:

  1. cmd can be a complex shell commands with &&, || or pipe. This fixes The re-implementation of snowsaw in go cannot handle complex shell commands #98.
  2. Expansion of ~ and environment variables are performed the same way as regular shell commands.

@xulongwu4 xulongwu4 changed the title Allow complex shell commands in the shell task The way to go: Allow complex shell commands in the shell task Dec 27, 2021
@arcticicestudio
Copy link
Owner

Hi @xulongwu4 👋, thanks for your contribution 👍
I'll test and review the changes within the next week(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants