MCPcopy Create free account
hub / github.com/devspace-sh/devspace / getCommand

Function getCommand

pkg/devspace/services/terminal/terminal.go:248–259  ·  view source on GitHub ↗
(devContainer *latest.DevContainer)

Source from the content-addressed store, hash-verified

246}
247
248func getCommand(devContainer *latest.DevContainer) []string {
249 command := devContainer.Terminal.Command
250 if command == "" {
251 command = "command -v bash >/dev/null 2>&1 && exec bash || exec sh"
252 }
253
254 if devContainer.Terminal.WorkDir != "" {
255 return []string{"sh", "-c", fmt.Sprintf("cd %s; %s", devContainer.Terminal.WorkDir, command)}
256 }
257
258 return []string{"sh", "-c", command}
259}

Callers 1

StartTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected