documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Use relative binary path for jammit on the command-line #233

Closed samuelclay closed 12 years ago

samuelclay commented 12 years ago

I wrote this a while ago, but I think it's time for a pull request to at least debate its merits. Uses realpath instead of wrongpath.

jashkenas commented 12 years ago

What exactly does it fix? When does __FILE__ not work currently?

samuelclay commented 12 years ago

If the binary is a symlink, then __FILE__ is pointing to the wrong place. realpath dereferences the binary, so the relative path works correctly. Ran into this issue.