// Local func (c Ctrl) LocalCommand(cmdf string, args ...interface{}) (GenericCommand, error) { cmd := shell.Command(cmdf, args...) cmd.Dir = c.config.LocalCd cmd.Shell = c.config.LocalShell cmd.Logger = c.log err := cmd.SetEnvMap(c.config.LocalEnv) return cmd, err }
func (c Ctrl) localRemoteCommand(cmdf string, args ...interface{}) (GenericCommand, error) { cmd := shell.Command(cmdf, args...) cmd.Dir = c.host.RemoteCd cmd.Shell = c.host.RemoteShell cmd.Logger = c.log err := cmd.SetEnvMap(c.host.RemoteEnv) return cmd, err }