Commits

doob committed 84b28f8

Now checks if the configuration file exsits and is well formed.

  • Participants
  • Parent commits 0537e32

Comments (0)

Files changed (2)

dake/config/config.rb

 			path.each { |e| file = load_impl(e) } if path.is_a? Array
 			file = load_impl(path) if path.is_a? String
 
+			raise "Malformed configuration file \"#{file}\"" if @config.is_a? FalseClass
 			raise "Could not find configuration file(s) \"#{file}\"" if @config.empty?
 		end
 		

dake/config/settings.rb

 # License:: [Boost Software License 1.0]http://www.boost.org/LICENSE_1_0.txt
 #
 
+require "pathname"
 require "singleton"
 
 import "dake.dake.application"
 		def module_deps_ext; ".moduleDeps".freeze end
 		def depsExt; "_deps.yml".freeze end
 		
-		def dake_configs; $POSIX ? "/etc/dake".freeze : "".freeze end
+		def dake_exe_path; File.dirname($0) end
+		def dake_configs; $POSIX ? "/etc/dake".freeze : dake_exe_path.freeze end
 		def dake_default_config; dake_configs/"default".freeze end
 		def dake_config_exts; [".yml", ".yaml"].freeze end
 		
 			return ".exe".freeze if $WINDOWS
 		end
 		
-		def executable_prefix
-			"".freeze
-		end
+		def executable_prefix; "".freeze end
+		
+		
 	end	
 end