-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
--npm
flag not being respected (#52)
- Loading branch information
1 parent
ec0fdbc
commit d4e5408
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -336,6 +336,25 @@ describe("install", () => { | |
); | ||
}); | ||
|
||
it("overwrite detection with arg from npm_config_user_agent", async () => { | ||
await withTempEnv( | ||
["i", "--npm", "@std/[email protected]"], | ||
async (dir) => { | ||
assert.ok( | ||
await isFile(path.join(dir, "package-lock.json")), | ||
"npm lockfile not created", | ||
); | ||
}, | ||
{ | ||
env: { | ||
...process.env, | ||
npm_config_user_agent: | ||
`pnpm/8.14.3 ${process.env.npm_config_user_agent}`, | ||
}, | ||
}, | ||
); | ||
}); | ||
|
||
it("detect yarn from npm_config_user_agent", async () => { | ||
await withTempEnv( | ||
["i", "@std/[email protected]"], | ||
|