etc
etc

Reputation: 565

Capistrano isn't applying path environment to second command

My Capistrano deployments are hanging on the second command in a composite command.

https://github.com/capistrano/capistrano/blob/5986983915163e6681f2546bf6fad599d58cd024/lib/capistrano/dsl.rb#L59

At the point that SSHKit tries to run the following command:

cd /home/lawfm/deployments/staging/repo && git rev-parse

I get a bash: git: command not found error.

I believe the issue is documented here: https://github.com/capistrano/capistrano/issues/675

My deploy was working in 3.0.1, but an upgrade to 3.1 introduced the error. At first, I read that pty was now on by default, so I set:

set :pty, false

Unfortunately, it seems neither .bash_profile nor .profile are being loaded, so any attempt to augment the PATH there have been fruitless.

I can't seem to figure out a way to set the path or even map the git command directly since it's the second command.

Upvotes: 1

Views: 70

Answers (1)

etc
etc

Reputation: 565

I can't figure out a way to fix the path not being applied to the second command, but I did place the PATH definition in my .bashrc file instead of .bash_profile and it now works.

Upvotes: 1

Related Questions