Skip to content

Commit

Permalink
Fix type nits
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Dec 25, 2024
1 parent 8f1c4bc commit 705d699
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/optimize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ async function addOverrides(
{
agent,
agentExecPath,
lockBasename,
lockSrc,
manifestEntries,
npmExecPath,
Expand Down Expand Up @@ -848,7 +849,7 @@ export const optimize: CliSubcommand = {
return
}
const lockName = lockPath ? lockBasename : 'lock file'
if (lockSrc === undefined) {
if (lockBasename === undefined || lockSrc === undefined) {
console.error(`✖️ ${COMMAND_TITLE}: No ${lockName} found`)
return
}
Expand Down

0 comments on commit 705d699

Please sign in to comment.