cvogt / cbt

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Other
488 stars 60 forks source link

Incorrect finding of $CBT_HOME when cbt symlink is relative #583

Closed buzden closed 6 years ago

buzden commented 6 years ago

After cloning CBT and symlinking the cbt executable from those place that is in $PATH, I get the following when running cbt:

/usr/local/bin/cbt: line 109: ../../../home/buzden/cbt/realpath/realpath.sh: No such file or directory
(Note: nailgun not found. It makes CBT faster! Try 'brew install nailgun' or 'apt-get install nailgun'.)
Error: Could not find or load main class cbt.NailgunLauncher

Just to clarify the paths: /home/buzden/cbt is the directory where CBT-repository was cloned to, /usr/local/bin/cbt is a symlink in a directory that is in $PATH.

It is important that symlink was made relative, i.e. I used ln -sf ../../../home/buzden/cbt/cbt . command. If I had used absolute symlink, everything run okay. But every time you make an absolute symlink, one kitten dies. Let's save the kittens!

cvogt commented 6 years ago

very nice report and PR, great stuff :)