refactor: smaller fixes

This commit is contained in:
Julian Tölle 2024-08-17 22:52:05 +02:00
parent 8abea51ec8
commit 4d435fa952
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)
}