diff --git a/CHANGELOG b/CHANGELOG index 8da6a6f..3e9bbea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,2 +1,5 @@ +0.1.1: +- Pass session environment variables to command + 0.1.0: - Initial release diff --git a/CONFIGURATION.md b/CONFIGURATION.md index 48e129b..dcdde14 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -26,8 +26,9 @@ portals: command: ps -aux host: - localhost:19003 + - :19004 # Expose port 19004 to the internet system monitor: command: htop host: - - localhost:19004 + - localhost:19005 ``` diff --git a/pkg/gate/portal.go b/pkg/gate/portal.go index 0046d09..95234e4 100644 --- a/pkg/gate/portal.go +++ b/pkg/gate/portal.go @@ -61,6 +61,7 @@ func NewPortal(name string, address string, command []string) (*Portal, error) { } cmd := exec.CommandContext(cmdCtx, command[0], args...) + cmd.Env = sshSession.Environ() cmd.Env = append(cmd.Env, fmt.Sprintf("TERM=%s", ptyReq.Term)) f, err := pty.Start(cmd)