Skip to content

Commit

Permalink
abyss-pe: test if zsh supports -o pipefail
Browse files Browse the repository at this point in the history
and if not, fallback to using `bash` as SHELL

closes #240
  • Loading branch information
Ben Vandervalk committed Aug 20, 2018
1 parent 9aceb97 commit 8992a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/abyss-pe
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Anthony Raymond <traymond@bcgsc.ca>.

SHELL=bash -e -o pipefail
ifneq ($(shell command -v zsh),)
ifeq ($(shell zsh -e -o pipefail -c 'true' 2>/dev/null; echo $$?), 0)
# Set pipefail to ensure that all commands of a pipe succeed.
SHELL=zsh -e -o pipefail
# Report run time and memory usage with zsh.
Expand Down

2 comments on commit 8992a58

@sjackman
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, Ben! That's elegant. I like it.

@benvvalk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjackman Thanks!

Please sign in to comment.