Files
paseo/scripts/postinstall-patches.mjs
2026-02-04 23:46:54 +07:00

15 lines
542 B
JavaScript

import { existsSync } from "node:fs";
import { spawnSync } from "node:child_process";
// In CI we often install a single workspace (e.g. server/relay/website). Only apply patches
// when the patched dependency is actually present.
const hasDraggableFlatlist = existsSync("node_modules/react-native-draggable-flatlist");
if (!hasDraggableFlatlist) {
process.exit(0);
}
const cmd = process.platform === "win32" ? "patch-package.cmd" : "patch-package";
const result = spawnSync(cmd, { stdio: "inherit" });
process.exit(result.status ?? 1);