mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-04 10:34:55 +02:00
Use constant for WAIT_FOR_DEBUGGER env var
This commit is contained in:
parent
2f6a87df98
commit
92e107f52d
@ -31,7 +31,7 @@ func main() {
|
||||
|
||||
integrationTest := getIntegrationTest()
|
||||
|
||||
if os.Getenv("WAIT_FOR_DEBUGGER") != "" {
|
||||
if os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) != "" {
|
||||
println("Waiting for debugger to attach...")
|
||||
for !isDebuggerAttached() {
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
const (
|
||||
TEST_NAME_ENV_VAR = "TEST_NAME"
|
||||
SANDBOX_ENV_VAR = "SANDBOX"
|
||||
WAIT_FOR_DEBUGGER_ENV_VAR = "WAIT_FOR_DEBUGGER"
|
||||
GIT_CONFIG_GLOBAL_ENV_VAR = "GIT_CONFIG_GLOBAL"
|
||||
)
|
||||
|
||||
@ -215,7 +216,7 @@ func getLazygitCommand(test *IntegrationTest, paths Paths, rootDir string, sandb
|
||||
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", SANDBOX_ENV_VAR, "true"))
|
||||
}
|
||||
if waitForDebugger {
|
||||
cmdObj.AddEnvVars("WAIT_FOR_DEBUGGER=true")
|
||||
cmdObj.AddEnvVars(fmt.Sprintf("%s=true", WAIT_FOR_DEBUGGER_ENV_VAR))
|
||||
}
|
||||
// Set a race detector log path only to avoid spamming the terminal with the
|
||||
// logs. We are not showing this anywhere yet.
|
||||
|
Loading…
Reference in New Issue
Block a user