Skip to content

Commit

Permalink
Merge pull request #5 from XenitAB/fix/err-check
Browse files Browse the repository at this point in the history
Fix file not exists error check
  • Loading branch information
phillebaba authored May 2, 2023
2 parents 5585fba + 246f2d4 commit 2cf4709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/repository_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (r *RepositoryFileResource) Read(ctx context.Context, req resource.ReadRequ
}
absPath := filepath.Join(client.Path(), data.ID.ValueString())
b, err := os.ReadFile(absPath)
if err != nil && errors.Is(os.ErrNotExist, err) {
if err != nil && errors.Is(err, os.ErrNotExist) {
diags = resp.State.SetAttribute(ctx, path.Root("id"), "")
resp.Diagnostics.Append(diags...)
return
Expand Down

0 comments on commit 2cf4709

Please sign in to comment.