cli icon indicating copy to clipboard operation
cli copied to clipboard

Expects that platformsh/upsun binary is in PATH

Open shyim opened this issue 2 years ago • 3 comments

❯ ../upsun push
Selected project: test (ismaivrbmrny6)

Pushing HEAD to the environment main (type: production) of project test (ismaivrbmrny6)

Are you sure you want to continue? [Y/n] Y

  fish: Unknown command: upsun
  fish:
  upsun ssh-cert:load --refresh-only --yes --quiet 2>/dev/null
  ^~~~^

Upsun should not expect himself in the PATH and should use the called binary aka arg 0 for further execution.

shyim avatar Nov 06 '23 12:11 shyim

Using arg 0 would not work in that case, as the SSH daemon (that needs to refresh the SSH keys) will not be in the same directory as you when executing that command.

An alternative approach would be to try to get the absolute path and use that if it's a command that needs to use it (ie certificate refresh, calling on itself, etc, while keeping the existing binary config option for documentation purposes.

WDYT @pjcdawkins?

akalipetis avatar Nov 27 '23 13:11 akalipetis

Note the listed error is actually upsun calling ssh, and then ssh calling upsun. There wouldn't be a way to use arg 0 in this case. Perhaps we could configure SSH with an absolute path to upsun, but that could be fragile.

pjcdawkins avatar Nov 27 '23 23:11 pjcdawkins

check that the dir is in PATH and add when not?

shyim avatar Nov 28 '23 10:11 shyim