mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
15 lines
542 B
JavaScript
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);
|
|
|