1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-23 21:51:07 +02:00

apply user config changes in sandbox mode

This commit is contained in:
Jesse Duffield 2022-12-20 23:07:43 +11:00
parent 186b7197e4
commit dde70486a1
3 changed files with 3 additions and 7 deletions

View File

@ -32,6 +32,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/gui/services/custom_commands"
"github.com/jesseduffield/lazygit/pkg/gui/style"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/integration/components"
integrationTypes "github.com/jesseduffield/lazygit/pkg/integration/types"
"github.com/jesseduffield/lazygit/pkg/tasks"
"github.com/jesseduffield/lazygit/pkg/theme"
@ -426,7 +427,7 @@ func (gui *Gui) initGocui(headless bool, test integrationTypes.IntegrationTest)
playMode = gocui.RECORDING
} else if Replaying() {
playMode = gocui.REPLAYING
} else if test != nil {
} else if test != nil && os.Getenv(components.SANDBOX_ENV_VAR) != "true" {
playMode = gocui.REPLAYING_NEW
}

View File

@ -39,11 +39,6 @@ func getIntegrationTest() integrationTypes.IntegrationTest {
return nil
}
if os.Getenv(components.SANDBOX_ENV_VAR) == "true" {
// when in sandbox mode we don't want the test controlling the gui
return nil
}
integrationTestName := os.Getenv(components.TEST_NAME_ENV_VAR)
if integrationTestName == "" {
panic(fmt.Sprintf(

View File

@ -154,7 +154,7 @@ func getLazygitCommand(test *IntegrationTest, paths Paths, rootDir string, sandb
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", TEST_NAME_ENV_VAR, test.Name()))
if sandbox {
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", "SANDBOX", "true"))
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", SANDBOX_ENV_VAR, "true"))
}
if keyPressDelay > 0 {