MCPcopy Index your code
hub / github.com/jetify-com/devbox / devboxExecutable

Function devboxExecutable

internal/setup/setup.go:375–387  ·  view source on GitHub ↗

devboxExecutable returns the path to the Devbox launcher script or the current binary if the launcher is unavailable.

()

Source from the content-addressed store, hash-verified

373// devboxExecutable returns the path to the Devbox launcher script or the
374// current binary if the launcher is unavailable.
375func devboxExecutable() (string, error) {
376 if exe := os.Getenv(envir.LauncherPath); exe != "" {
377 if abs, err := filepath.Abs(exe); err == nil {
378 return abs, nil
379 }
380 }
381
382 exe, err := os.Executable()
383 if err != nil {
384 return "", redact.Errorf("get path to devbox executable: %v", err)
385 }
386 return exe, nil
387}
388
389func isSudo(key string) bool {
390 // DEVBOX_SUDO_TASK is set when a task relaunched Devbox by calling

Callers 1

SudoDevboxFunction · 0.70

Calls 1

ErrorfFunction · 0.92

Tested by

no test coverage detected