Open shyim opened 8 months ago
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?
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.
check that the dir is in PATH and add when not?
Upsun should not expect himself in the PATH and should use the called binary aka arg 0 for further execution.