openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 591 B
JavaScript
import{a as pluginCacheRealpathSync}from"./plugin-cache-files-BGuripl0.mjs";import{C as resolveIsNixMode}from"./paths-D_FOvGon.mjs";import path from"node:path";
//!src/plugins/hardlink-policy.ts
const NIX_STORE_ROOT=`/nix/store`;function isNixStorePluginRoot(e){const t=pluginCacheRealpathSync(e)??path.resolve(e);return t===NIX_STORE_ROOT||t.startsWith(`${NIX_STORE_ROOT}/`)}function shouldRejectHardlinkedPluginFiles(e){if(e.origin===`bundled`)return false;if(resolveIsNixMode(e.env)&&isNixStorePluginRoot(e.rootDir))return false;return true}export{shouldRejectHardlinkedPluginFiles as t};