(envMap map[string]string)
| 113 | } |
| 114 | |
| 115 | func PruneInitialEnv(envMap map[string]string) map[string]string { |
| 116 | pruned := make(map[string]string) |
| 117 | for key, value := range envMap { |
| 118 | if strings.HasPrefix(key, "WAVETERM_") || strings.HasPrefix(key, "BASH_FUNC_") { |
| 119 | continue |
| 120 | } |
| 121 | if key == "XDG_SESSION_ID" || key == "SHLVL" || key == "S_COLORS" || |
| 122 | key == "SSH_CONNECTION" || key == "SSH_CLIENT" || key == "LESSOPEN" || |
| 123 | key == "which_declare" { |
| 124 | continue |
| 125 | } |
| 126 | pruned[key] = value |
| 127 | } |
| 128 | return pruned |
| 129 | } |
no outgoing calls
no test coverage detected