From a3b8ee1708523bd926dc0dc919bdb29fbe1ba966 Mon Sep 17 00:00:00 2001 From: Brian Ketelsen Date: Thu, 25 Dec 2025 21:46:49 -0500 Subject: [PATCH] fix: store hash on first enter Signed-off-by: Brian Ketelsen --- .igloo/igloo.ini | 2 +- cmd/enter.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.igloo/igloo.ini b/.igloo/igloo.ini index ac68abf..6e535b6 100644 --- a/.igloo/igloo.ini +++ b/.igloo/igloo.ini @@ -5,7 +5,7 @@ name = igloo-igloo ; Packages to install in the container [packages] -install = golang, make, git, gcc, libc6-dev +install = golang, make, git, gcc, libc6-dev, vim ; Host directory mounts [mounts] diff --git a/cmd/enter.go b/cmd/enter.go index 565f73d..cfccf13 100644 --- a/cmd/enter.go +++ b/cmd/enter.go @@ -72,6 +72,14 @@ func runEnter() error { fmt.Println(styles.Warning(fmt.Sprintf("Could not update config hash: %v", err))) } } + } else if currentHash != "" { + // No stored hash yet (first run with existing container) - store it now + storedHash, _ := config.GetStoredHash(cfg.Container.Name) + if storedHash == "" { + if err := config.StoreHash(cfg.Container.Name, currentHash); err != nil { + fmt.Println(styles.Warning(fmt.Sprintf("Could not store config hash: %v", err))) + } + } } }