Menu

Setting shell pipefail

2017-03-31
2017-03-31
  • John Drummond

    John Drummond - 2017-03-31

    I wan't to set shell option pipefail. In GNU Make I would just add:

    SHELL = /bin/bash -o pipefail

    .. to the top of the Makefile.

    Is there a way to do this in makepp? (without using set -o pipefail before every command)

     
  • Daniel Pfeiffer

    Daniel Pfeiffer - 2017-04-02

    That is alas currently not possible, because SHELL is the executable, not being split on whitespace. As a workaround, since you are using a powerful Shell, export to this might help:

       BASHOPTS
              A colon-separated list of enabled shell options.  Each word in the list is a valid argument for the
              -s  option  to the shopt builtin command (see SHELL BUILTIN COMMANDS below).  The options appearing
              in BASHOPTS are those reported as on by shopt.  If this variable is in the  environment  when  bash
              starts  up,  each  shell option in the list will be enabled before reading any startup files.  This
              variable is read-only.
    
     

Log in to post a comment.

MongoDB Logo MongoDB