     # it is a pre-req and this method does not check for it.
     results = []
     for k, p of dict
+      if not p.length
+        results = [str]
+        break
       for v, i in p
         results[i] = (results[i] || str).replace "%#{k}", v
     return results

        lines.pushScoped "#{k}=#{v}"

    lines.push '' # Ninja requires a newline at the end :)
    lines.join '\n'

MistNinjaBuilder.hashCommand = (command)->

    targets = []


    if statement.main_inputs.length
      statement.main_inputs =
        MistGlobber.doAllGlobs statement.main_inputs, @mistDir
      # TODO error on no inputs (but only if globs were supplied)

    if statement.foreach
      for inp in statement.main_inputs
