MCPcopy Index your code
hub / github.com/devspace-sh/devspace / getCommand

Method getCommand

helper/ssh/server.go:242–254  ·  view source on GitHub ↗
(sess ssh.Session)

Source from the content-addressed store, hash-verified

240}
241
242func (s *Server) getCommand(sess ssh.Session) *exec.Cmd {
243 var cmd *exec.Cmd
244 if len(sess.RawCommand()) == 0 {
245 cmd = exec.Command(s.shell)
246 } else {
247 args := []string{"-c", sess.RawCommand()}
248 cmd = exec.Command(s.shell, args...)
249 }
250
251 cmd.Env = append(cmd.Env, os.Environ()...)
252 cmd.Env = append(cmd.Env, sess.Environ()...)
253 return cmd
254}
255
256func exitWithError(s ssh.Session, err error) {
257 if err != nil {

Callers 1

handlerMethod · 0.95

Calls 1

EnvironMethod · 0.65

Tested by

no test coverage detected