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
f9a060bb
Commit
f9a060bb
authored
Jan 27, 2013
by
Keith Smiley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited editor behavior and errors
parent
4e629aea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
spec.rb
lib/cocoapods/command/spec.rb
+4
-3
No files found.
lib/cocoapods/command/spec.rb
View file @
f9a060bb
...
...
@@ -222,6 +222,7 @@ module Pod
end
exec_editor
(
filepath
.
to_s
)
if
File
.
exists?
filepath
raise
Informative
,
"
#{
filepath
}
doesn't exist."
end
# Thank you homebrew
...
...
@@ -235,16 +236,16 @@ module Pod
# If an editor wasn't set, try to pick a sane default
return
editor
unless
editor
.
nil?
# Find Sublime Text 2
return
'subl'
if
which
'subl'
# Find Textmate
return
'mate'
if
which
'mate'
# Find # BBEdit / TextWrangler
return
'edit'
if
which
'edit'
# Find Sublime Text 2
return
'subl'
if
which
'subl'
# Default to vim
return
'vim'
if
which
'vim'
raise
Informative
,
"
[!] Failed to open editor. Set your EDITOR environment variable."
.
red
raise
Informative
,
"
Failed to open editor. Set your 'EDITOR' environment variable."
end
def
exec_editor
*
args
...
...
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