Skip to content

Commit

Permalink
Print a message when updating a project that has no files. They proba…
Browse files Browse the repository at this point in the history
…bly meant to install but forgot the directory argument. Closes #2.
  • Loading branch information
chriseppstein committed Jun 28, 2009
1 parent 802bca6 commit 15ebbfe
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lib/compass/commands/update_project.rb
Expand Up @@ -11,12 +11,22 @@ def initialize(working_path, options)
end

def perform
compiler = Compass::Compiler.new(working_path,
compiler = new_compiler_instance
if compiler.sass_files.empty?
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

def new_compiler_instance(options = {})
Compass::Compiler.new(working_path,
projectize(Compass.configuration.sass_dir),
projectize(Compass.configuration.css_dir),
Compass.sass_engine_options.merge(:quiet => options[:quiet],
:force => options[:force]))
compiler.run
:force => options[:force]).merge(options))
end

end
Expand Down

0 comments on commit 15ebbfe

Please sign in to comment.