about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/teleport/tsh.patch
blob: fac9c98ab0496dc10493f3855218a6fe913daffb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tool/tsh/tsh.go b/tool/tsh/tsh.go
index f73b0a4e46..6848286781 100644
--- a/tool/tsh/tsh.go
+++ b/tool/tsh/tsh.go
@@ -1065,10 +1065,11 @@ func Run(ctx context.Context, args []string, opts ...cliOption) error {
 
 	var err error
 
-	cf.executablePath, err = os.Executable()
+	tempBinaryPath, err := os.Executable()
 	if err != nil {
 		return trace.Wrap(err)
 	}
+	cf.executablePath = path.Dir(tempBinaryPath) + "/tsh"
 
 	// configs
 	setEnvFlags(&cf)