This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new d5634c4 test writability vs assume based on the path
d5634c4 is described below
commit d5634c4879432e77b9fb7d78e37794c0e3114f27
Author: Sam Ruby <[email protected]>
AuthorDate: Wed Dec 4 14:29:11 2019 -0500
test writability vs assume based on the path
---
config/setupmymac | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/config/setupmymac b/config/setupmymac
index d66feb7..db03f34 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -340,16 +340,16 @@ end
### Install bundler
if `which bundle`.empty?
- if `which gem`.chomp == '/usr/bin/gem'
- sudo {run 'gem install bundler'}
- else
+ if File.writable? Gem.dir
run 'gem install bundler'
+ else
+ sudo {run 'gem install bundler'}
end
elsif force[:bundler]
- if `which gem`.chomp == '/usr/bin/gem'
- sudo {run 'gem update bundler'}
- else
+ if File.writable? Gem.dir
run 'gem update bundler'
+ else
+ sudo {run 'gem update bundler'}
end
ARGS.push '--no-bundle'