qrush / sub

a delicious way to organize programs
http://37signals.com/svn/posts/3264-automating-with-convention-introducing-sub
MIT License
1.74k stars 148 forks source link

Exec libexec/sub from bin/sub instead of symlinking #40

Closed evnm closed 4 years ago

evnm commented 10 years ago

While trying to provide a tool built with sub as a gem, I learned that symlinks aren't maintained while building gems. This meant that bin/sub would be flattened into a copy of libexec/sub rather than remaining a symlink. This was problematic because the bin file within a gem must be a ruby script.

This change execs libexec/sub instead of symlinking, which removes a roadblock when gemifying sub projects.

markstos commented 8 years ago

I got bitten by this today after copying the file directory via scp. I hadn't ran into the problem with rsync or tar, so I wasn't expecting a problem with scp, but the version of scp I have didn't support symlinks, resulting an "command not found" error on the other end, because the top level command was found, but none of the sub-commands were found.

Short of avoiding symlinks, it would nice if this issue was detected-- the main script should be able to detect the right symlink is in place and throw a more helpful message if the symlink is expected but has been flattened.