fix(cli): properly handle subdir plugin updates
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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 || ""
|
||||||
|
|||||||
Reference in New Issue
Block a user