Commit 6998e436 authored by Fabio Pelosin's avatar Fabio Pelosin

[Command::Project] Temporary fix for not overriding the config.

parent 9ccd8e89
...@@ -16,11 +16,17 @@ module Pod ...@@ -16,11 +16,17 @@ module Pod
base.extend Options base.extend Options
end end
# @todo find a better way to not override the config if the flag was not
# specified. A solution could be a method called only if the flag
# is not nil:
#
# argv.set_flag('clean') { |value| config.clean = value }
#
def initialize(argv) def initialize(argv)
config.clean = argv.flag?('clean', true) config.clean = value if value = argv.flag?('clean')
config.generate_docs = argv.flag?('doc', true) config.generate_docs = value if value = argv.flag?('doc')
config.integrate_targets = argv.flag?('integrate', true) config.integrate_targets = value if value = argv.flag?('integrate')
config.skip_repo_update = !argv.flag?('update', true) config.skip_repo_update = value if value = !argv.flag?('update')
super super
end end
......
require 'pathname'
module Pod module Pod
# Stores the global configuration of CocoaPods. # Stores the global configuration of CocoaPods.
...@@ -98,8 +96,8 @@ module Pod ...@@ -98,8 +96,8 @@ module Pod
if user_settings_file.exist? if user_settings_file.exist?
require 'yaml' require 'yaml'
user_config = YAML.load_file(user_settings_file) user_settings = YAML.load_file(user_settings_file)
configure_with(user_config) configure_with(user_settings)
end end
end end
...@@ -189,8 +187,6 @@ module Pod ...@@ -189,8 +187,6 @@ module Pod
# @note The Podfile can be named either `CocoaPods.podfile` or `Podfile`. # @note The Podfile can be named either `CocoaPods.podfile` or `Podfile`.
# The first is preferred as it allows to specify an OS X UTI. # The first is preferred as it allows to specify an OS X UTI.
# #
# @todo Rename to podfile_path.
#
def podfile_path def podfile_path
unless @podfile_path unless @podfile_path
@podfile_path = project_root + 'CocoaPods.podfile' @podfile_path = project_root + 'CocoaPods.podfile'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment