Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Top level directories are empty, so make them simply absolute.

  • Loading branch information...
commit bb221f7f8810765bd0c8c0a3cf3d56694884dbb5 1 parent 2c9884d
Michael Kessler netzpirat authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/guard/coffeescript/runner.rb
1  lib/guard/coffeescript/runner.rb
View
@@ -108,6 +108,7 @@ def options_for_file(file, options)
# @option options [Boolean] :noop do not generate an output file
#
def write_javascript_file(content, file, directory, options)
+ directory = Dir.pwd if !directory || directory.empty?
FileUtils.mkdir_p(File.expand_path(directory)) if !File.directory?(directory) && !options[:noop]
filename = File.join(directory, File.basename(file.gsub(/(js\.coffee|coffee)$/, 'js')))
File.open(File.expand_path(filename), 'w') { |f| f.write(content) } if !options[:noop]
Please sign in to comment.
Something went wrong with that request. Please try again.