Skip to content

Commit 0f17e4b

Browse files
committed
fix: metadata respecting --compact
1 parent faad949 commit 0f17e4b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/cli/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,15 @@ const main = defineCommand({
226226
}
227227

228228
const formattedSha = isCompact ? abbreviateCommitHash(sha) : sha;
229-
const depUrl = new URL(
230-
`/${owner}/${repo}/${pJson.name}@${formattedSha}`,
231-
apiUrl,
232-
).href;
229+
let depUrl;
230+
if (isCompact) {
231+
depUrl = new URL(`/${pJson.name}@${formattedSha}`, apiUrl).href;
232+
} else {
233+
depUrl = new URL(
234+
`/${owner}/${repo}/${pJson.name}@${formattedSha}`,
235+
apiUrl,
236+
).href;
237+
}
233238
deps.set(pJson.name, depUrl);
234239
realDeps?.set(pJson.name, pJson.version ?? depUrl);
235240

0 commit comments

Comments
 (0)