Skip to content

Commit

Permalink
download: if the lock file does not exist, error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jsquyres committed Mar 26, 2024
1 parent f664c2b commit 0e5f2e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0e5f2e4

Please sign in to comment.