Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Exit when installation failed on pipeline #2548

Merged
merged 4 commits into from
Jun 17, 2020

Conversation

ultmaster
Copy link
Contributor

@ultmaster ultmaster commented Jun 11, 2020

@ultmaster ultmaster closed this Jun 11, 2020
@ultmaster ultmaster reopened this Jun 11, 2020
@chicm-ms chicm-ms requested review from liuzhe-lz and chicm-ms June 12, 2020 09:27
@liuzhe-lz
Copy link
Contributor

liuzhe-lz commented Jun 12, 2020

This will not fix the problem I suppose.
Bash script returns the return code of last command. So set -e does not affect the return code of install.sh.

Test scripts:
oneline.sh

#!/bin/bash
[[ 0 == 1 ]]

twolines.sh

#!/bin/bash
[[ 0 == 1 ]]
echo x > /dev/null

test.sh (result is 1 0 1 0)

./oneline.sh
echo $?
./twolines.sh
echo $?
source oneline.sh
echo $?
source twolines.sh
echo $?

# pytorch Mac binary does not support CUDA, default is cpu version
python3 -m pip install torchvision==0.6.0 torch==1.5.0 --user
python3 -m pip install tensorflow==1.15.2 --user
brew install swig@3
rm /usr/local/bin/swig
if [ -e /usr/local/bin/swig ]; then rm /usr/local/bin/swig; fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this equal to rm -f?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks.

@ultmaster ultmaster merged commit d04441b into microsoft:master Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants