Skip to content

Commit

Permalink
fix: remove duplicate var (#8117)
Browse files Browse the repository at this point in the history
Following up on #8115. Since `cleanFetchSpec` no longer differs from
`fetchSpec`, it's no longer needed. cc @wraithgar
  • Loading branch information
TrevorBurnham authored Feb 18, 2025
1 parent 811ca29 commit d586f3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workspaces/arborist/lib/consistent-resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => {
raw,
} = npa(resolved, fromPath)
if (type === 'file' || type === 'directory') {
const cleanFetchSpec = fetchSpec
if (relPaths && toPath) {
return `file:${relpath(toPath, cleanFetchSpec)}`
return `file:${relpath(toPath, fetchSpec)}`
}
return `file:${cleanFetchSpec}`
return `file:${fetchSpec}`
}
if (hosted) {
return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(hostedOpt)}`
Expand Down

0 comments on commit d586f3b

Please sign in to comment.