sandboxbox 3.0.26 → 3.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/sandbox.js +16 -1
package/package.json
CHANGED
package/utils/sandbox.js
CHANGED
|
@@ -255,7 +255,22 @@ export function createSandbox(projectDir) {
|
|
|
255
255
|
const pluginsDir = join(hostClaudeDir, 'plugins');
|
|
256
256
|
if (existsSync(pluginsDir)) {
|
|
257
257
|
const sandboxPluginsDir = join(sandboxClaudeDir, 'plugins');
|
|
258
|
-
|
|
258
|
+
|
|
259
|
+
// Check real paths to avoid copying directory to itself
|
|
260
|
+
let shouldCopyPlugins = true;
|
|
261
|
+
try {
|
|
262
|
+
const pluginsRealPath = realpathSync(pluginsDir);
|
|
263
|
+
const sandboxPluginsRealPath = realpathSync(sandboxPluginsDir);
|
|
264
|
+
if (pluginsRealPath === sandboxPluginsRealPath) {
|
|
265
|
+
shouldCopyPlugins = false;
|
|
266
|
+
}
|
|
267
|
+
} catch (e) {
|
|
268
|
+
// If we can't resolve real paths, proceed with copy attempt
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (shouldCopyPlugins) {
|
|
272
|
+
cpSync(pluginsDir, sandboxPluginsDir, { recursive: true });
|
|
273
|
+
}
|
|
259
274
|
}
|
|
260
275
|
}
|
|
261
276
|
}
|