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
a3ec49e2
Commit
a3ec49e2
authored
Feb 16, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Repo remove] Handle file permission errors
Fixes #1778
parent
5a6c8391
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
CHANGELOG.md
CHANGELOG.md
+6
-0
repo.rb
lib/cocoapods/command/repo.rb
+2
-0
repo_spec.rb
spec/functional/command/repo_spec.rb
+8
-0
No files found.
CHANGELOG.md
View file @
a3ec49e2
...
@@ -19,6 +19,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -19,6 +19,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
*
Improves
`pod init`
to save Xcode project file in Podfile when one was supplied.
*
Improves
`pod init`
to save Xcode project file in Podfile when one was supplied.
[
Kyle Fuller
](
https://github.com/kylef
)
[
Kyle Fuller
](
https://github.com/kylef
)
###### Bug Fixes
*
Fixes a bug with
`pod repo remove`
silently handling permission errors.
[
Kyle Fuller
](
https://github.com/kylef
)
#1778
## 0.29.0
## 0.29.0
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0
)
[
CocoaPods
](
https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0
)
...
...
lib/cocoapods/command/repo.rb
View file @
a3ec49e2
...
@@ -163,6 +163,8 @@ module Pod
...
@@ -163,6 +163,8 @@ module Pod
super
super
help!
'Deleting a repo needs a `NAME`.'
unless
@name
help!
'Deleting a repo needs a `NAME`.'
unless
@name
help!
"repo
#{
@name
}
does not exist"
unless
File
.
directory?
(
dir
)
help!
"repo
#{
@name
}
does not exist"
unless
File
.
directory?
(
dir
)
help!
"You do not have permission to delete the
#{
@name
}
repository."
\
"Perhaps try prefixing this command with sudo."
unless
File
.
writable?
(
dir
)
end
end
def
run
def
run
...
...
spec/functional/command/repo_spec.rb
View file @
a3ec49e2
...
@@ -104,6 +104,14 @@ module Pod
...
@@ -104,6 +104,14 @@ module Pod
lambda
{
run_command
(
'repo'
,
'remove'
,
'nonexistant'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'repo'
,
'remove'
,
'nonexistant'
)
}.
should
.
raise
CLAide
::
Help
end
end
it
"complains if we do not have permission"
do
File
.
stubs
(
:writable?
).
returns
(
false
)
upstream
=
SpecHelper
.
temporary_directory
+
'upstream'
FileUtils
.
cp_r
(
test_repo_path
,
upstream
)
lambda
{
run_command
(
'repo'
,
'remove'
,
upstream
)
}.
should
.
raise
CLAide
::
Help
FileUtils
.
rm_rf
(
upstream
)
end
it
"removes a spec-repo"
do
it
"removes a spec-repo"
do
upstream
=
SpecHelper
.
temporary_directory
+
'upstream'
upstream
=
SpecHelper
.
temporary_directory
+
'upstream'
FileUtils
.
cp_r
(
test_repo_path
,
upstream
)
FileUtils
.
cp_r
(
test_repo_path
,
upstream
)
...
...
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