mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-27 00:51:18 +02:00
apply user config changes in sandbox mode
This commit is contained in:
@ -32,6 +32,7 @@ import (
|
|||||||
"github.com/jesseduffield/lazygit/pkg/gui/services/custom_commands"
|
"github.com/jesseduffield/lazygit/pkg/gui/services/custom_commands"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
integrationTypes "github.com/jesseduffield/lazygit/pkg/integration/types"
|
integrationTypes "github.com/jesseduffield/lazygit/pkg/integration/types"
|
||||||
"github.com/jesseduffield/lazygit/pkg/tasks"
|
"github.com/jesseduffield/lazygit/pkg/tasks"
|
||||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||||
@ -426,7 +427,7 @@ func (gui *Gui) initGocui(headless bool, test integrationTypes.IntegrationTest)
|
|||||||
playMode = gocui.RECORDING
|
playMode = gocui.RECORDING
|
||||||
} else if Replaying() {
|
} else if Replaying() {
|
||||||
playMode = gocui.REPLAYING
|
playMode = gocui.REPLAYING
|
||||||
} else if test != nil {
|
} else if test != nil && os.Getenv(components.SANDBOX_ENV_VAR) != "true" {
|
||||||
playMode = gocui.REPLAYING_NEW
|
playMode = gocui.REPLAYING_NEW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,11 +39,6 @@ func getIntegrationTest() integrationTypes.IntegrationTest {
|
|||||||
return nil
|
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)
|
integrationTestName := os.Getenv(components.TEST_NAME_ENV_VAR)
|
||||||
if integrationTestName == "" {
|
if integrationTestName == "" {
|
||||||
panic(fmt.Sprintf(
|
panic(fmt.Sprintf(
|
||||||
|
@ -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()))
|
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", TEST_NAME_ENV_VAR, test.Name()))
|
||||||
if sandbox {
|
if sandbox {
|
||||||
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", "SANDBOX", "true"))
|
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", SANDBOX_ENV_VAR, "true"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if keyPressDelay > 0 {
|
if keyPressDelay > 0 {
|
||||||
|
Reference in New Issue
Block a user