(key string)
| 387 | } |
| 388 | |
| 389 | func isSudo(key string) bool { |
| 390 | // DEVBOX_SUDO_TASK is set when a task relaunched Devbox by calling |
| 391 | // SudoDevbox. If it matches the current task key, then the pre-sudo |
| 392 | // process is already running this task and we can skip checking |
| 393 | // task.NeedsRun and prompting the user. |
| 394 | envTask := os.Getenv("DEVBOX_SUDO_TASK") |
| 395 | return envTask != "" && envTask == key |
| 396 | } |