diff --git a/state/project.go b/state/project.go index 274e9938..5dbd9c88 100644 --- a/state/project.go +++ b/state/project.go @@ -387,10 +387,10 @@ func vendorUniverse(ctx context.Context, p string) error { return err } - // add universe to `.gitignore` + // add universe and lock file to `.gitignore` if err := os.WriteFile( path.Join(p, "cue.mod", "pkg", ".gitignore"), - []byte(fmt.Sprintf("# dagger universe\n%s\n", stdlib.PackageName)), + []byte(fmt.Sprintf("# generated by dagger\n%s\ndagger.lock\n", stdlib.PackageName)), 0600, ); err != nil { return err