Skip to content

Commit fde5d00

Browse files
committed
fix: use noSave when creating a lockfile entry
Related: wclr#68
1 parent fb993c9 commit fde5d00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/add.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,15 @@ export const addPackages = async (
217217
writePackage(workingDir, localPkg)
218218
}
219219

220+
const saved = !doPure && !options.noSave
220221
addPackageToLockfile(
221222
addedInstalls.map(i => ({
222223
name: i!.name,
223224
version: i!.version,
224225
replaced: i!.replaced,
225226
pure: doPure,
226-
file: !options.link && !doPure,
227-
link: options.link && !doPure,
227+
file: saved && !options.link,
228+
link: saved && options.link,
228229
signature: i.signature
229230
})),
230231
{ workingDir }

0 commit comments

Comments
 (0)