fix(gerrit-cli): don't output the path to SSH if it's on the path

Change-Id: Ic5ef3e9ae7984cc6c84ef99553bc94a7d44c3929
Reviewed-on: https://cl.tvl.fyi/c/depot/+/551
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Luke Granger-Brown 2020-06-22 00:29:09 +01:00 committed by lukegb
parent 4de63f784c
commit 68779da596

View file

@ -4,10 +4,10 @@
pkgs.writeShellScriptBin "gerrit" ''
TVL_USERNAME=''${TVL_USERNAME:-$(whoami)}
if which ssh 2>/dev/null; then
if which ssh &>/dev/null; then
ssh=ssh
else
ssh="${pkgs.openssh}/bin/ssh"
fi
$ssh $TVL_USERNAME@code.tvl.fyi -p 29418 -- gerrit $@
exec $ssh $TVL_USERNAME@code.tvl.fyi -p 29418 -- gerrit $@
''