Allow setting shell command for executed commands


#1

It’s a bit annoying that I have to do “set” before every command:

- 'set -eu -o pipefail; xcodebuild clean build test -workspace CeltraKit.xcworkspace -scheme "CeltraKit" -destination "platform=iOS Simulator,name=iPhone 6" | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml'
- 'set -eu -o pipefail; xcodebuild clean build test -workspace CeltraKit.xcworkspace -scheme "Ad Tester" -destination "platform=iOS Simulator,name=iPhone 6" | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml'
- 'set -eu -o pipefail; xcodebuild -workspace CeltraKit.xcworkspace -scheme "Build Framework" | xcpretty --color'

Can you add a configuration option that allows one to specify the shell for their own commands, e.g. “/bin/bash -eu -o -pipefail” ?


#2

Hi,

Thank you for your feature request.

Not taking anything away from your request as I’m sure there are several people who would find this useful but don’t forget you can also create a Bash script and run it from circle.yml. This way you don’t need to repeat certain pieces.


#3

Clearly, but then you don’t get too see commands as individual steps with their nice colors and timings :slight_smile:


#4

You can append these commands into the file names .circlerc in the home directory. This file is sourced before every command is run.

This should do what you need.


#5

Does this work on both Linux and OS X?


#6

Seems like it does.

@marc, is this safe to use / is it going to continue working? I can’t see it documented anywhere.


#7

As far as I can tell it’s not, but it was referenced by staff here so I would expect it to be safe to use.


#8