Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
d10e94ce
Commit
d10e94ce
authored
May 26, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Allow sandbox-pod to execute any tool inside a rbenv prefix.
parent
e3ac34f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
sandbox-pod
bin/sandbox-pod
+14
-2
No files found.
CHANGELOG.md
View file @
d10e94ce
...
...
@@ -11,6 +11,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
Ruby (1.8.7).
[
#939
](
https://github.com/CocoaPods/CocoaPods/issues/939#issuecomment-18396063
)
*
Allow sandbox-pod to execute any tool inside the Xcode.app bundle.
*
Allow sandbox-pod to execute any tool inside a rbenv prefix.
## 0.20.1
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.20.0...0.20.1
)
...
...
bin/sandbox-pod
View file @
d10e94ce
...
...
@@ -124,14 +124,26 @@ class Profile
RbConfig
::
CONFIG
[
'prefix'
]
end
def
prefix_from_bin
(
bin_name
)
unless
(
path
=
`which
#{
bin_name
}
`
.
strip
).
empty?
File
.
dirname
(
File
.
dirname
(
path
))
end
end
def
prefixes
prefixes
=
[
'/bin'
,
'/usr/bin'
,
'/usr/libexec'
,
xcode_app_path
]
prefixes
<<
`brew --prefix`
.
strip
unless
`which brew`
.
strip
.
empty?
# From asking people, it seems MacPorts does not have a `prefix` command, like
# Homebrew does, so make an educated guess:
unless
(
port
=
`which port`
.
strip
).
empty?
prefixes
<<
File
.
dirname
(
File
.
dirname
(
port
))
if
port_prefix
=
prefix_from_bin
(
'port'
)
prefixes
<<
port_prefix
end
if
rbenv_prefix
=
prefix_from_bin
(
'rbenv'
)
prefixes
<<
rbenv_prefix
end
prefixes
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment