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
base.extend Options
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)
config.clean = argv.flag?('clean', true)
config.generate_docs = argv.flag?('doc', true)
config.integrate_targets = argv.flag?('integrate', true)
config.skip_repo_update = !argv.flag?('update', true)
config.clean = value if value = argv.flag?('clean')
config.generate_docs = value if value = argv.flag?('doc')
config.integrate_targets = value if value = argv.flag?('integrate')
config.skip_repo_update = value if value = !argv.flag?('update')
super
end
......
require 'pathname'
module Pod
# Stores the global configuration of CocoaPods.
......@@ -98,8 +96,8 @@ module Pod
if user_settings_file.exist?
require 'yaml'
user_config = YAML.load_file(user_settings_file)
configure_with(user_config)
user_settings = YAML.load_file(user_settings_file)
configure_with(user_settings)
end
end
......@@ -189,8 +187,6 @@ module Pod
# @note The Podfile can be named either `CocoaPods.podfile` or `Podfile`.
# The first is preferred as it allows to specify an OS X UTI.
#
# @todo Rename to podfile_path.
#
def podfile_path
unless @podfile_path
@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