ToShell outputs the environment into an evaluatable string that is understood by the target shell
(shell Shell)
| 84 | // ToShell outputs the environment into an evaluatable string that is |
| 85 | // understood by the target shell |
| 86 | func (env Env) ToShell(shell Shell) (string, error) { |
| 87 | e := make(ShellExport) |
| 88 | |
| 89 | for key, value := range env { |
| 90 | e.Add(key, value) |
| 91 | } |
| 92 | |
| 93 | return shell.Export(e) |
| 94 | } |
| 95 | |
| 96 | // Serialize marshals the env into the gzenv format |
| 97 | func (env Env) Serialize() string { |