jashkenas / coffeescript

Unfancy JavaScript
https://coffeescript.org/
MIT License
16.44k stars 1.98k forks source link

First letter of subdirectory names missing when using -o option #829

Closed zdzolton closed 13 years ago

zdzolton commented 13 years ago

Hi,

It seems that when using the -c and -o options together (to output a directory structure full of JavaScript files to mirror a directory structure full of CoffeeScript files) that the first letter of each nested directory's name is missing!

Here's a terminal session illustrating the bug:

Code $ mkdir -p ./coffee-bug/foo/bar && cd coffee-bug
coffee-bug $ touch ./foo/bar/baz.coffee
coffee-bug $ coffee -co quux ./foo
coffee-bug $ ls -lR ./quux
total 0
drwxr-xr-x  3 zach  staff  102 Nov  3 14:08 ar

./quux/ar:
total 8
-rw-r--r--  1 zach  staff  30 Nov  3 14:08 baz.js

Note how in this example the coffee command created a directory named "ar", nested under "quux", instead of "bar" like it was supposed to.

FWIW, I'm using node v0.2.4 and coffee v0.9.4.

Thanks,

Zach

jashkenas commented 13 years ago

Sorry about 0.9.4 -- I can confirm that this bug no longer exists on the latest master. You can give that a try now, or wait for a point release...

zdzolton commented 13 years ago

Oh, it's no prob. Just wanted to make sure you knew about the bug.