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
817af7c8
Commit
817af7c8
authored
Apr 05, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Got `pod` command without any args to work.
parent
b9c37bc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
sandbox-pod
bin/sandbox-pod
+77
-0
No files found.
bin/sandbox-pod
0 → 100755
View file @
817af7c8
#!/usr/bin/env ruby
if
$0
==
__FILE__
#ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
#require "rubygems"
#require "bundler/setup"
$:
.
unshift
File
.
expand_path
(
'../../lib'
,
__FILE__
)
end
require
'pathname'
require
'cocoapods/config'
pod_bin
=
File
.
expand_path
(
'../pod'
,
__FILE__
)
pod_root
=
File
.
expand_path
(
'../..'
,
pod_bin
)
ruby_bin
=
`rbenv which ruby`
.
strip
ruby_root
=
File
.
expand_path
(
'../..'
,
ruby_bin
)
require
'erb'
profile
=
ERB
.
new
(
DATA
.
read
).
result
(
TOPLEVEL_BINDING
)
filename
=
'/tmp/sandbox-pod.sb'
File
.
open
(
filename
,
'w'
)
{
|
f
|
f
.
write
(
profile
)
}
puts
profile
command
=
[
'/usr/bin/sandbox-exec'
,
'-f'
,
filename
,
pod_bin
,
*
ARGV
]
exec
*
command
__END__
(version 1)
(debug allow)
(allow file-ioctl)
(allow sysctl-read)
(allow file-read-metadata)
(allow mach-lookup)
(allow ipc-posix-shm)
(allow process-fork)
(allow process-exec
(regex
#"^<%= pod_bin %>"
#"^<%= ruby_bin %>"
#"^/usr/bin/*"
)
)
;; Allow these reads:
(allow file-read*
(regex
#"^/Users/[^.]+/.gemrc"
#"^/Users/[^.]+/.gem/*"
#"^/Library/*"
#"^/System/Library/*"
#"^/usr/lib/*"
#"^/usr/share/*"
#"^/private/*"
#"^/dev/*"
#"^<%= File.join(ruby_root, '*') %>"
#"^<%= File.join(pod_root, '*') %>"
#"^<%= Pod::Config.instance.repos_dir %>"
)
)
;; Allow these writes:
(allow file-write*
(regex
#"^<%= File.join(Pod::Config.instance.project_root, '*') %>"
;#"^/Users/[^.]+/Library/.*"
;#"^/private/var/*"
#"^/dev/dtracehelper"
)
)
(deny default)
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