I'm trying to automate the installation of a tool's dependency with a tool dependency definition repository. After moving the contents of a downloaded archive to the installation directory (i.e. $INSTALL_DIR
), I simply want to change to that target directory away from the initial temporary working directory. However, I can't seem to change directory, either with a change_directory action or a cd
shell_command action. Running pwd
before and after attempting to change directory confirms this (installation log). I even made sure that $INSTALL_DIR
is different from my initial working directory.
I obtained a workaround for this issue from the galaxy-dev mailing list (see link). You can run a series of shell commands within the same shell_command action, i.e. separated by semi-colons ( ; ), in which you change directory in one of the commands. For instance, cd $INSTALL_DIR; perl INSTALL.pl
.
Hi,
not sure if I can help you, but using cd as shell_command is expected to fail. You need to use cd together with an additional command. The cd of one shell_command is not persistent. change_working_directory should work, if not it is a bug. Which Galaxy version are you using?
You are trying to install a perl library right? Have you seen this kind of functionality? Maybe this solves your issue.
Ciao,
Bjoern
I also posted this question to the galaxy-dev mailing list (see here) and got the suggestion to string commands together in a shell_command action (see my answer to this post). Obviously, my first attempt was with the change_directory action. It's only when this didn't work that I tried the cd
command. I don't know where to find the Galaxy version number, but I cloned the repository within the past week. All I can find is that it's revision 78c9a97be4b6+.
Also, for the sake of being exhaustive, I tried using "change_working_directory" as the action type (as opposed to "change_directory", which I took from the wiki), but that produced another error (presumably due to a parsing error). So, this could be a bug, because neither "change_directory" nor "change_working_directory" changed the working directory permanently (based on running pwd
right after).
By the way, this is for installing Ensembl VEP, not a Perl module. However, I will take note of the setup_perl_environment action type for other tools. It will come in handy. Thanks!
Hi,
this is really strange and maybe a bug. You can see the change_directory tag here in action:
https://toolshed.g2.bx.psu.edu/view/iuc/package_perl_5_18
And according to the usual unit tests that are running daily in the Tool Shed it is working.
Ciao,
Bjoern