From f0eaed33548c17df7da9b3a06299cc6f6964d704 Mon Sep 17 00:00:00 2001 From: zhangli Date: Tue, 30 Jun 2026 18:05:11 +0800 Subject: [PATCH] fix(plugin): create temp dir in project path to avoid cross-filesystem EXDEV on Rename pluginInstallLocal used os.MkdirTemp("") which creates the temp directory on the system temp partition. On Windows (and some Linux/macOS setups), the temp partition is on a different filesystem from the project directory, causing os.Rename to fail with EXDEV. Use projectPath as the temp dir parent so it is always on the same filesystem as node_modules. --- shortcuts/apps/apps_plugin_install.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shortcuts/apps/apps_plugin_install.go b/shortcuts/apps/apps_plugin_install.go index fa6871cea..7c929aaa9 100644 --- a/shortcuts/apps/apps_plugin_install.go +++ b/shortcuts/apps/apps_plugin_install.go @@ -226,7 +226,7 @@ func pluginInstallLocal(rctx *common.RuntimeContext, projectPath, tgzPath string } // Extract to a temp dir first to read package.json - tmpDir, err := os.MkdirTemp("", "plugin-local-*") //nolint:forbidigo + tmpDir, err := os.MkdirTemp(projectPath, ".plugin-tmp-*") //nolint:forbidigo // same FS as node_modules to avoid EXDEV on Rename if err != nil { return appsFileIOError(err, "cannot create temp dir") }