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:
parent
b6ffa1ba43
commit
dc9d2cc16b
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue