From 6878899c4ca0297da54b46e2ae100da2179fd6c1 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 11:40:59 -0800 Subject: [PATCH] [Command Line] Don't force the user to specify the configuration path when calling compass config --- lib/compass/commands/write_configuration.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/compass/commands/write_configuration.rb b/lib/compass/commands/write_configuration.rb index acf60301..bc7d6988 100644 --- a/lib/compass/commands/write_configuration.rb +++ b/lib/compass/commands/write_configuration.rb @@ -59,8 +59,11 @@ module Compass end end else - directory File.dirname(options[:configuration_file]) - installer.write_configuration_files(options[:configuration_file]) + config_file = options[:configuration_file] + config_file ||= Compass.detect_configuration_file + config_file ||= Compass::Configuration::Helpers::KNOWN_CONFIG_LOCATIONS.first + directory File.dirname(config_file) + installer.write_configuration_files(config_file) end end