mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
Only read env once when recording dirs
This commit is contained in:
parent
b8fc829f86
commit
d8d0d4686d
@ -20,10 +20,11 @@ func (gui *Gui) recordCurrentDirectory() error {
|
||||
}
|
||||
|
||||
func (gui *Gui) recordDirectory(dirName string) error {
|
||||
if os.Getenv("LAZYGIT_NEW_DIR_FILE") == "" {
|
||||
newDirFilePath := os.Getenv("LAZYGIT_NEW_DIR_FILE")
|
||||
if newDirFilePath == "" {
|
||||
return nil
|
||||
}
|
||||
return gui.OSCommand.CreateFileWithContent(os.Getenv("LAZYGIT_NEW_DIR_FILE"), dirName)
|
||||
return gui.OSCommand.CreateFileWithContent(newDirFilePath, dirName)
|
||||
}
|
||||
|
||||
func (gui *Gui) handleQuitWithoutChangingDirectory() error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user