fix(plugin): always shallow clone plugins

This commit is contained in:
saberzero1 2026-03-16 12:19:52 +01:00
parent cc8756b0c7
commit b2971bde6b
No known key found for this signature in database

View File

@ -880,7 +880,9 @@ export async function handlePluginRestore() {
styleText("cyan", `${name}: cloning ${entry.resolved}@${entry.commit.slice(0, 7)}...`),
)
const branchArg = entry.ref ? ` --branch ${entry.ref}` : ""
execSync(`git clone${branchArg} ${entry.resolved} ${pluginDir}`, { stdio: "ignore" })
execSync(`git clone --depth 1${branchArg} ${entry.resolved} ${pluginDir}`, {
stdio: "ignore",
})
execSync(`git checkout ${entry.commit}`, { cwd: pluginDir, stdio: "ignore" })
console.log(styleText("green", `${name} restored`))
restoredPlugins.push({ name, pluginDir })