Skip to content

Commit

Permalink
FIx build
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Sep 6, 2024
1 parent a620c84 commit a0d2f2d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,18 @@ private static void checkFilesStatusForPatching(
}
}

/**
* Apply a patch file under a directory
*
* @param patchFile the patch file to apply
* @param strip the number of leading components to strip from file path in the patch file
* @param outputDirectory the directory to apply the patch file to
*/
public static void apply(Path patchFile, int strip, Path outputDirectory)
throws IOException, PatchFailedException {
apply(patchFile, strip, outputDirectory, /* singleFile= */ null);
}

/**
* Apply a patch file under a directory
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public void patch(Object patchFile, StarlarkInt stripI, String watchPatch, Starl
}
maybeWatch(starlarkPath, ShouldWatch.fromString(watchPatch));
try {
PatchUtil.apply(starlarkPath.getPath(), strip, workingDirectory, /* singleFile= */ null);
PatchUtil.apply(starlarkPath.getPath(), strip, workingDirectory);
} catch (PatchFailedException e) {
throw new RepositoryFunctionException(
Starlark.errorf("Error applying patch %s: %s", starlarkPath, e.getMessage()),
Expand Down

0 comments on commit a0d2f2d

Please sign in to comment.