#726 Can't run fansh when $pwd == {fan.home}/bin directory

mjames Thu 20 Aug 2009

fansh reports the following error working from {fan.home}/bin:

mjames@home:~/FanSandbox/fan-1.0.45/bin$ fansh

/home/mjames/FanSandbox/fan-1.0.45/bin/fansh(9,2): Unexpected end of Str literal, missing } ERROR: cannot compile script

Anyone else see that? Works fine when in any other directory but {fan.home}/bin

mjames Thu 20 Aug 2009

Seems to be a name collision between the actual script !/bin/fansh and the argument intended to be passed to the fanx.tools.Fan class, renaming !/bin/fansh to !/bin/fans resolves the problem.

mjames Thu 20 Aug 2009

Happens with flux, too. You can add "cd ${FAN_HOME}" in the fanlauncer() function defined in !/bin/fanlauncher anytime before you actually invoke the command, but thats just a workaround for fansh and breaks everything else, so pretty much pointless.

Without compiling in some debug to know for sure, I'd be inclined to think its a bug somewhere in the LocalFile object incorrectly resolving to the local "fansh" file instead of falling through and invoking the shell itself.

brian Thu 20 Aug 2009

Without compiling in some debug to know for sure, I'd be inclined to think its a bug somewhere in the LocalFile object incorrectly resolving to the local "fansh" file

Yeap that is what was happening. Thanks for reporting Mike.

I pushed a fix where the script must end in ".fan". This is how it was documented to work in docTools::Fan. But if that causes anybody problems let me know.

Login or Signup to reply.