From 0e5f2e4580f867e06a4efa6e6d25cbf6c99456a8 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 26 Mar 2024 00:40:11 +0000 Subject: [PATCH] download: if the lock file does not exist, error If we `grabit download --lock-file foo` and the file `foo` does not exist, that should emit an error. Likewise, if you `grabit download` and rely on the default `grabit.lock` file to exist, we should also error if that file does not exist. Signed-off-by: Jeff Squyres --- cmd/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/download.go b/cmd/download.go index 42504cb..0756ebd 100644 --- a/cmd/download.go +++ b/cmd/download.go @@ -26,7 +26,7 @@ var downloadCmd = &cobra.Command{ func runFetch(cmd *cobra.Command, args []string) { lockFile, err := cmd.Flags().GetString("lock-file") FatalIfNotNil(err) - lock, err := internal.NewLock(lockFile, true) + lock, err := internal.NewLock(lockFile, false) FatalIfNotNil(err) dir, err := cmd.Flags().GetString("dir") FatalIfNotNil(err)