mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-21 13:35:42 -05:00
fix(plugin): always shallow clone plugins
This commit is contained in:
parent
cc8756b0c7
commit
b2971bde6b
@ -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 })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user