Return a proper error when starting the watcher when there's nothing to compile.
Closes GH-119
This commit is contained in:
parent
5f37fe48d6
commit
5dee634404
@ -29,12 +29,15 @@ module Compass
|
||||
|
||||
def perform
|
||||
compiler = new_compiler_instance
|
||||
check_for_sass_files!(compiler)
|
||||
compiler.run
|
||||
end
|
||||
|
||||
def check_for_sass_files!(compiler)
|
||||
if compiler.sass_files.empty? && !dry_run?
|
||||
message = "Nothing to compile. If you're trying to start a new project, you have left off the directory argument.\n"
|
||||
message << "Run \"compass -h\" to get help."
|
||||
raise Compass::Error, message
|
||||
else
|
||||
compiler.run
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -36,6 +36,7 @@ module Compass
|
||||
exit 0
|
||||
end
|
||||
|
||||
check_for_sass_files!(new_compiler_instance)
|
||||
recompile
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user