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
6eed7f54
Commit
6eed7f54
authored
Jun 03, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Executable] Ensure the retval has the correct line endings
parent
c7145ba6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
executable.rb
lib/cocoapods/executable.rb
+12
-9
No files found.
lib/cocoapods/executable.rb
View file @
6eed7f54
...
@@ -64,7 +64,7 @@ module Pod
...
@@ -64,7 +64,7 @@ module Pod
end
end
status
=
popen3
(
bin
,
command
,
stdout
,
stderr
)
status
=
popen3
(
bin
,
command
,
stdout
,
stderr
)
output
=
stdout
.
join
(
"
\n
"
)
+
stderr
.
join
(
"
\n
"
)
output
=
stdout
.
join
+
stderr
.
join
unless
status
.
success?
unless
status
.
success?
if
raise_on_failure
if
raise_on_failure
raise
Informative
,
"
#{
full_command
}
\n\n
#{
output
}
"
raise
Informative
,
"
#{
full_command
}
\n\n
#{
output
}
"
...
@@ -80,8 +80,8 @@ module Pod
...
@@ -80,8 +80,8 @@ module Pod
def
self
.
popen3
(
bin
,
command
,
stdout
,
stderr
)
def
self
.
popen3
(
bin
,
command
,
stdout
,
stderr
)
require
'open3'
require
'open3'
Open3
.
popen3
(
bin
,
*
command
)
do
|
i
,
o
,
e
,
t
|
Open3
.
popen3
(
bin
,
*
command
)
do
|
i
,
o
,
e
,
t
|
read
(
o
,
stdout
)
read
er
(
o
,
stdout
)
read
(
e
,
stderr
)
read
er
(
e
,
stderr
)
i
.
close
i
.
close
status
=
t
.
value
status
=
t
.
value
...
@@ -94,20 +94,20 @@ module Pod
...
@@ -94,20 +94,20 @@ module Pod
end
end
end
end
def
self
.
read
(
input
,
output
)
def
self
.
read
er
(
input
,
output
)
Thread
.
new
do
Thread
.
new
do
buf
=
''
buf
=
''
begin
begin
loop
do
loop
do
buf
<<
input
.
readpartial
(
4096
)
buf
<<
input
.
readpartial
(
4096
)
loop
do
loop
do
string
,
separator
,
buf
=
buf
.
partition
(
/[\
n\r
]/
)
string
,
separator
,
buf
=
buf
.
partition
(
/[\
r\n
]/
)
break
if
separator
.
empty?
break
if
separator
.
empty?
output
<<
(
string
<<
separator
)
output
<<
[
string
,
separator
]
end
end
end
end
rescue
EOFError
rescue
EOFError
output
<<
(
buf
<<
"
\n
"
)
unless
buf
.
size
==
0
output
<<
buf
unless
buf
.
size
==
0
end
end
end
end
end
end
...
@@ -142,8 +142,11 @@ module Pod
...
@@ -142,8 +142,11 @@ module Pod
#
#
# @return [void]
# @return [void]
#
#
def
<<
(
value
)
def
<<
(
obj
)
super
value
,
newline
=
Array
(
obj
)
newline
||=
"
\n
"
value
=
value
+
newline
super
(
value
)
ensure
ensure
@io
<<
"
#{
indent
}#{
value
}
"
if
@io
@io
<<
"
#{
indent
}#{
value
}
"
if
@io
end
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