Skip to content

Commit

Permalink
fix npe in the case of no parent directory (#7222)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeFrosch authored Jan 14, 2025
1 parent fa69310 commit 426a45b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public AffectedPackages getAffectedPackages() {
context().output(PrintOutput.log("Edited %d BUILD files", buildFileChanges.size()));
for (WorkspaceFileChange c : buildFileChanges) {
Path buildPackage = c.workspaceRelativePath.getParent();

if (buildPackage == null) {
buildPackage = Path.of("");
}

if (c.operation != Operation.ADD) {
// modifying/deleting an existing package
if (!lastQuery().getPackages().contains(buildPackage)) {
Expand Down

0 comments on commit 426a45b

Please sign in to comment.