1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Updated filepath for cygwin support

This commit is contained in:
Benjamin 2015-03-20 14:40:20 +01:00
parent b6ffa1ba43
commit dc9d2cc16b

View file

@ -28,8 +28,15 @@ module ExecJS
source = @runtime.compile_source(source)
tmpfile = write_to_tempfile(source)
if ExecJS.cygwin?
filepath = `cygpath -m #{tmpfile.path}`.rstrip
else
filepath = tmpfile.path
end
begin
extract_result(@runtime.exec_runtime(tmpfile.path), tmpfile.path)
extract_result(@runtime.exec_runtime(filepath), filepath)
ensure
File.unlink(tmpfile)
end