Skip to content

Commit 3873190

Browse files
frolByron
authored andcommitted
Fixed Travis for Mac OS
The solution is backported from rustfmt: * rust-lang/rustfmt#2229 * rust-lang/rustfmt#2504
1 parent fa2c76e commit 3873190

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.travis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ rust:
66
- stable
77
- nightly
88
before_script:
9-
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/Library/Python/2.7/bin:$HOME/.local/bin:$PATH
9+
- |
10+
if [ $TRAVIS_OS_NAME = 'osx' ]; then
11+
virtualenv env &&
12+
source env/bin/activate &&
13+
python --version &&
14+
pip install 'travis-cargo<0.2'
15+
else
16+
pip install 'travis-cargo<0.2' --user &&
17+
export PATH="$(python -m site --user-base)/bin:$PATH"
18+
fi
1019
script:
1120
- travis-cargo build
1221
- travis-cargo test

0 commit comments

Comments
 (0)