fix(cli): properly handle subdir plugin updates

This commit is contained in:
saberzero1
2026-03-26 11:39:20 +01:00
parent a876a1e11e
commit 144b7d9a4a
2 changed files with 5 additions and 3 deletions

View File

@@ -196,7 +196,7 @@
"resolved": "https://github.com/saberzero1/quartz-themes.git", "resolved": "https://github.com/saberzero1/quartz-themes.git",
"commit": "0af2a0592b72a5971210789fe16bca7ba2b769a3", "commit": "0af2a0592b72a5971210789fe16bca7ba2b769a3",
"subdir": "plugin", "subdir": "plugin",
"installedAt": "2026-03-25T23:36:25.409Z" "installedAt": "2026-03-26T10:39:10.052Z"
}, },
"reader-mode": { "reader-mode": {
"source": "github:quartz-community/reader-mode", "source": "github:quartz-community/reader-mode",

View File

@@ -847,10 +847,12 @@ export async function handlePluginUpdate(names) {
subdir: entry.subdir, subdir: entry.subdir,
pluginDir, pluginDir,
}) })
if (needsBuild(pluginDir)) {
updatedPlugins.push({ name, pluginDir })
}
if (newCommit !== entry.commit) { if (newCommit !== entry.commit) {
entry.commit = newCommit entry.commit = newCommit
entry.installedAt = new Date().toISOString() entry.installedAt = new Date().toISOString()
updatedPlugins.push({ name, pluginDir })
console.log( console.log(
styleText( styleText(
"green", "green",
@@ -858,7 +860,7 @@ export async function handlePluginUpdate(names) {
), ),
) )
} else { } else {
console.log(styleText("gray", `${name} already up to date`)) console.log(styleText("gray", `${name} rebuilt (subdir: ${entry.subdir})`))
} }
} else { } else {
const fetchRef = entry.ref || "" const fetchRef = entry.ref || ""