jsx / JSX

JSX - a faster, safer, easier JavaScript
http://jsx.github.io/
MIT License
1.46k stars 102 forks source link

JSX can't generate output file if it has absolute path on Windows #315

Closed shibukawa closed 10 years ago

shibukawa commented 10 years ago

OK:

C:\Users\yoshi_000\dev\grunt-jsx>node_modules\.bin\jsx --output hello2 --executable node fixtures/hello2.jsx

C:\Users\yoshi_000\dev\grunt-jsx>node hello2
Hello, world! No.2

NG:

C:\Users\yoshi_000\dev\grunt-jsx>node_modules\.bin\jsx --output C:\Users\yoshi_000\hello2 --executable node fixtures/hello2.jsx

fs.js:642
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: ENOENT, no such file or directory 'C:\Users\yoshi_000\dev\grunt-jsx\C:'
    at Object.fs.mkdirSync (fs.js:642:18)
    at Object.NodePlatform.mkpath$S (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:6245:11)
    at Object.NodePlatform.mkpath$S (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:6243:9)
    at Object.NodePlatform.mkpath$S (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:6243:9)
    at Object.NodePlatform.save$USS (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:6223:8)
    at JSXCommand$main$LPlatform$AS (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:6848:13)
    at Function._Main$main$AS (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:468:13)
    at Object.JSX.runMain (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:42813:15)
    at C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:42855:5
    at Object.<anonymous> (C:\Users\yoshi_000\dev\grunt-jsx\node_modules\jsx\bin\jsx:42856:3)

C:\Users\yoshi_000\dev\grunt-jsx>
kazuho commented 10 years ago

@shibukawa has this bug been fixed in #316?

shibukawa commented 10 years ago

Yes, #316 is patch for this issue.

kazuho commented 10 years ago

Thank you for closing the issue.