]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
allow file(x, :missing => '') macro to report the path of x in the missing text. hotfix/6374 master
authorelijah <elijah@riseup.net>
Wed, 25 Jun 2014 19:48:04 +0000 (12:48 -0700)
committerelijah <elijah@riseup.net>
Wed, 25 Jun 2014 19:48:04 +0000 (12:48 -0700)
lib/leap_cli/config/object.rb

index 3375c6a1f2739f158ca906eab0d90087f48be230..2392d1c25f54d731f94ad77328c7629458db9504 100644 (file)
@@ -261,7 +261,7 @@ module LeapCli
           rescue FileMissing => exc
             Util::bail! do
               if exc.options[:missing]
           rescue FileMissing => exc
             Util::bail! do
               if exc.options[:missing]
-                Util::log :missing, exc.options[:missing].gsub('$node', self.name)
+                Util::log :missing, exc.options[:missing].gsub('$node', self.name).gsub('$file', exc.path)
               else
                 Util::log :error, "while evaluating node '#{self.name}'"
                 Util::log "offending key: #{key}", :indent => 1
               else
                 Util::log :error, "while evaluating node '#{self.name}'"
                 Util::log "offending key: #{key}", :indent => 1