refactor: smaller fixes

This commit is contained in:
Julian Tölle 2024-08-17 22:52:05 +02:00
parent fbd47fac62
commit 0c93645b21
2 changed files with 11 additions and 11 deletions

View file

@ -61,9 +61,9 @@ func WithCommit(message string, options ...CommitOption) Commit {
for _, fileInfo := range opts.files {
file, err := wt.Filesystem.Create(fileInfo.path)
require.NoError(t, err, "failed to create file %q", fileInfo.path)
defer file.Close()
_, err = file.Write([]byte(fileInfo.content))
file.Close()
require.NoError(t, err, "failed to write content to file %q", fileInfo.path)
}