lib/autoproj/cli/switch_config.rb in autoproj-2.0.0.b5 vs lib/autoproj/cli/switch_config.rb in autoproj-2.0.0.b6
- old
+ new
@@ -9,18 +9,17 @@
def run(args, options = Hash.new)
if Dir.pwd.start_with?(ws.remotes_dir) || Dir.pwd.start_with?(ws.config_dir)
raise ConfigError, "you cannot run autoproj switch-config from autoproj's configuration directory or one of its subdirectories"
end
+ ws.load_config
+
# We must switch to the root dir first, as it is required by the
# configuration switch code. This is acceptable as long as we
# quit just after the switch
switcher = Ops::MainConfigSwitcher.new(ws)
if switcher.switch_config(*args)
- manifest = Manifest.load(File.join(ws.config_dir, 'manifest'))
- update = Ops::Configuration.new(ws, ws.loader)
- update.update_configuration
- ws.config.save
+ CLI::Main.start(['update', '--config'])
end
end
end
end
end