d57131dc49500a056c5b78b0fb444c7cb1ca83cd

Author
Septs <github@septs.pw>
Committer
GitHub <noreply@github.com>
Date

Message

fix(shell-proxy): change NAME env variable for WSL clash (#9447)

Diff

 1diff --git a/plugins/shell-proxy/proxy.py b/plugins/shell-proxy/proxy.py
 2index 2b62f6cb5363a756765e07d92626438163d4d2d5..d2e5361cb67c06c0c12bd1f4cd288822ceee0a8e 100755
 3--- a/plugins/shell-proxy/proxy.py
 4+++ b/plugins/shell-proxy/proxy.py
 5@@ -30,7 +30,7 @@ def merge(mapping: dict):
 6 class CommandSet:
 7     proxies = make_proxies(get_http_proxy())
 8     aliases = {
 9-        _: "env NAME=%s %s" % (_, ssh_agent)
10+        _: "env __SSH_PROGRAM_NAME__=%s %s" % (_, ssh_agent)
11         for _ in ("ssh", "sftp", "scp", "slogin", "ssh-copy-id")
12     }
13 
14diff --git a/plugins/shell-proxy/ssh-agent.py b/plugins/shell-proxy/ssh-agent.py
15index 61cf84c0b8bfe67cd9a4465b9d70d23fcb7fa6c8..4ee24b7551009edb173ee49098eb67f734afb82e 100755
16--- a/plugins/shell-proxy/ssh-agent.py
17+++ b/plugins/shell-proxy/ssh-agent.py
18@@ -6,7 +6,7 @@ import sys
19 ssh_proxy = os.path.join(os.path.dirname(__file__), "ssh-proxy.py")
20 
21 argv = [
22-    os.environ.get("NAME", "ssh"),
23+    os.environ.get("__SSH_PROGRAM_NAME__", "ssh"),
24     "-o",
25     "ProxyCommand={} %h %p".format(ssh_proxy),
26     "-o",