mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-12 02:42:56 +02:00
Remote control launch: Fix the --copy-env option not copying current environment variables
Fixes #6724
This commit is contained in:
26
tools/cmd/at/launch.go
Normal file
26
tools/cmd/at/launch.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package at
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func copy_local_env(copy_env bool) []string {
|
||||
if copy_env {
|
||||
return os.Environ()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func copy_local_cwd(copy_cwd string) string {
|
||||
if copy_cwd == "current" {
|
||||
if c, e := os.Getwd(); e == nil {
|
||||
copy_cwd = c
|
||||
}
|
||||
}
|
||||
return copy_cwd
|
||||
}
|
||||
Reference in New Issue
Block a user