lib/linner/command.rb in linner-0.11.1 vs lib/linner/command.rb in linner-0.11.2
- old
+ new
@@ -60,13 +60,11 @@
Linner.compile = true
Linner.strict = true if options[:strict]
clean
env.merge_with_environment(options[:environment])
Bundler.new(env).perform
- perform
- rescue
- Notifier.error $!
+ perform(build: true)
end
desc "watch", "watch assets"
method_option :environment,
type: :string,
@@ -98,11 +96,13 @@
private
def env
Linner.env
end
- def perform
+ def perform(build: false)
Notifier.profile { Linner.perform }
+ rescue
+ build ? Notifier.error($!) : Notifier.notify($!)
end
def watch_for_perform
Listen.to env.watched_paths do |modified, added, removed|
Linner.cache.expire_by(modified + added + removed)