mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04: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…
Reference in a new issue