Files
bun.sh/src/cli/patch_command.zig
2025-06-26 12:43:46 -07:00

19 lines
608 B
Zig

//! parse dependency of positional arg string (may include name@version for example)
//! get the precise version from the lockfile (there may be multiple)
//! copy the contents into a temp folder
pub const PatchCommand = struct {
pub fn exec(ctx: Command.Context) !void {
try updatePackageJSONAndInstallCatchError(ctx, .patch);
}
};
// @sortImports
const bun = @import("bun");
const string = bun.string;
const Command = bun.CLI.Command;
const PackageManager = bun.install.PackageManager;
const updatePackageJSONAndInstallCatchError = PackageManager.updatePackageJSONAndInstallCatchError;