Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/tool/tsh/tsh.go b/tool/tsh/tsh.go
2index 57379c40f..cb4d7b84c 100644
3--- a/tool/tsh/tsh.go
4+++ b/tool/tsh/tsh.go
5@@ -514,10 +514,11 @@ func Run(args []string, opts ...cliOption) error {
6 }
7 }
8
9- cf.executablePath, err = os.Executable()
10+ tempBinaryPath, err := os.Executable()
11 if err != nil {
12 return trace.Wrap(err)
13 }
14+ cf.executablePath = path.Dir(tempBinaryPath) + "/tsh"
15
16 if err := client.ValidateAgentKeyOption(cf.AddKeysToAgent); err != nil {
17 return trace.Wrap(err)