mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-21 12:16:54 +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()
|
integrationTest := getIntegrationTest()
|
||||||
|
|
||||||
if os.Getenv("WAIT_FOR_DEBUGGER") != "" {
|
if os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) != "" {
|
||||||
println("Waiting for debugger to attach...")
|
println("Waiting for debugger to attach...")
|
||||||
for !isDebuggerAttached() {
|
for !isDebuggerAttached() {
|
||||||
time.Sleep(time.Millisecond * 100)
|
time.Sleep(time.Millisecond * 100)
|
||||||
|
@ -16,6 +16,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
TEST_NAME_ENV_VAR = "TEST_NAME"
|
TEST_NAME_ENV_VAR = "TEST_NAME"
|
||||||
SANDBOX_ENV_VAR = "SANDBOX"
|
SANDBOX_ENV_VAR = "SANDBOX"
|
||||||
|
WAIT_FOR_DEBUGGER_ENV_VAR = "WAIT_FOR_DEBUGGER"
|
||||||
GIT_CONFIG_GLOBAL_ENV_VAR = "GIT_CONFIG_GLOBAL"
|
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"))
|
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", SANDBOX_ENV_VAR, "true"))
|
||||||
}
|
}
|
||||||
if waitForDebugger {
|
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
|
// Set a race detector log path only to avoid spamming the terminal with the
|
||||||
// logs. We are not showing this anywhere yet.
|
// logs. We are not showing this anywhere yet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user