Skip to content

Commit ebf43d7

Browse files
committed
fix: Do not ignore file deletion errors
When deleting a file errors (such as "409 Could not delete file: Changes must be made through a pull request") should not be silently ignored leaving the file undeleted from the repo but deleted from the state
1 parent 9fceeda commit ebf43d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github/resource_github_repository_file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ func resourceGithubRepositoryFileDelete(d *schema.ResourceData, meta interface{}
505505

506506
_, _, err := client.Repositories.DeleteFile(ctx, owner, repo, file, opts)
507507
if err != nil {
508-
return nil
508+
return err
509509
}
510510

511511
return nil

0 commit comments

Comments
 (0)