SSH Scripts: execute a command after cd

I’m having a problem running a script via SSH.
I can not access a folder with cd and after executing a command inside this folder, example:

cd /project/test
composer install

Is there a way to do this?

Thank you very much.

@g3luka, I’m pasting the same response I’ve sent you via email so that others could take a look:

Here’s what you should you need to know about SSH commands:

  • Each line is executed in the context of the working directory (default: user’s home dir)
  • Lines are executed from top to bottom
  • Each command should be one separate line
  • If a command fails, the next line will not be executed and the action will fail (unless you check ignore errors)
  • Use absolute paths: the cd command will not be carried over the next line
  • You can use Buddy specific variables in commands and URL’s
  • Environmental variables between lines are not shared
    If you want to use a more complex script, it’s advised to call it from the server side (make sure the exit code it returns is correct).

Make sure to run the following: cd /project/test && Composer install.