Skip to content

Commit 158be14

Browse files
committed
Lint nits
1 parent 34350ae commit 158be14

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

src/commands/optimize.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -895,21 +895,13 @@ export const optimize: CliSubcommand = {
895895
try {
896896
if (isNpm) {
897897
const wrapperPath = path.join(distPath, 'npm-cli.js')
898-
await spawn(
899-
process.execPath,
900-
[
901-
wrapperPath,
902-
'install',
903-
'--silent'
904-
],
905-
{
906-
stdio: 'ignore',
907-
env: {
908-
...process.env,
909-
[UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE]: '1'
910-
}
898+
await spawn(process.execPath, [wrapperPath, 'install', '--silent'], {
899+
stdio: 'ignore',
900+
env: {
901+
...process.env,
902+
[UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE]: '1'
911903
}
912-
)
904+
})
913905
} else {
914906
// All package managers support the "install" command.
915907
await spawn(agentExecPath, ['install'], { stdio: 'ignore' })

test/socket-npm.test.cjs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ for (const npm of ['npm8', 'npm10']) {
1919
const npmPath = path.join(npmFixturesPath, npm)
2020
const npmBinPath = path.join(npmPath, 'node_modules', '.bin')
2121

22-
spawnSync(
23-
'npm',
24-
['install', '--silent'],
25-
{
26-
cwd: npmPath,
27-
stdio: 'ignore'
28-
}
29-
)
22+
spawnSync('npm', ['install', '--silent'], {
23+
cwd: npmPath,
24+
stdio: 'ignore'
25+
})
3026

3127
describe(`Socket npm wrapper for ${npm}`, () => {
3228
it('should bail on new typosquat', async () => {

0 commit comments

Comments
 (0)