fix(tools/gerrit-cli): Don't wrap ssh sniffing in a subshell

This was actually executing ssh, which was kinda silly - we really just
want to check the return code of the `which` invocation

Change-Id: I8a4b277a2be3b0c6a43d2da830cb82a32f9ee51e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/428
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
Griffin Smith 2020-06-16 09:59:47 -04:00 committed by glittershark
parent 789696862a
commit 18994b9c58

View file

@ -4,7 +4,7 @@
pkgs.writeShellScriptBin "gerrit" ''
TVL_USERNAME=''${TVL_USERNAME:-$(whoami)}
if $(which ssh 2>/dev/null); then
if which ssh 2>/dev/null; then
ssh=ssh
else
ssh="${pkgs.openssh}/bin/ssh"