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
fbd48c13
Commit
fbd48c13
authored
Aug 13, 2014
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SourceManager] Disable remote check on update in favour of a warning
Closes
https://github.com/CocoaPods/CocoaPods/issues/2388
parent
d311e447
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
sources_manager.rb
lib/cocoapods/sources_manager.rb
+5
-4
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+10
-0
No files found.
lib/cocoapods/sources_manager.rb
View file @
fbd48c13
...
...
@@ -158,8 +158,10 @@ module Pod
output
=
git!
(
"pull --ff-only"
)
UI
.
puts
output
if
show_output
&&
!
config
.
verbose?
rescue
Informative
=>
e
raise
Informative
,
'An error occurred while performing '
\
"`git pull` on repo `
#{
source
.
name
}
`.
\n
"
+
e
.
message
UI
.
warn
"CocoaPods was not able to update the "
\
"`
#{
source
.
name
}
` repo. If this is an unexpected issue "
\
"and persists you can inspect it running "
\
"`pod repo update --verbose`"
end
end
check_version_information
(
source
.
data_provider
.
repo
)
...
...
@@ -334,8 +336,7 @@ module Pod
#
def
git_sources
aggregate
.
all
.
select
do
|
source
|
git_repo?
(
source
.
data_provider
.
repo
)
&&
git_remote_reachable?
(
source
.
data_provider
.
repo
)
git_repo?
(
source
.
data_provider
.
repo
)
end
end
end
...
...
spec/unit/sources_manager_spec.rb
View file @
fbd48c13
...
...
@@ -124,6 +124,16 @@ module Pod
SourcesManager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
end
it
"prints a warning if the update failed"
do
UI
.
warnings
=
''
set_up_test_repo_for_update
Dir
.
chdir
(
test_repo_path
)
do
`git remote set-url origin https://example.com`
end
SourcesManager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
UI
.
warnings
.
should
.
include
(
'not able to update the `master` repo'
)
end
it
'returns whether a source has a reachable git remote'
do
SourcesManager
.
git_remote_reachable?
(
repo_make
(
'a_new_repo_that_is_new'
)).
should
.
be
.
false
SourcesManager
.
git_remote_reachable?
(
SourcesManager
.
master_repo_dir
).
should
.
be
.
true
...
...
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