Skip to content

Commit

Permalink
fix linting issue
Browse files Browse the repository at this point in the history
Signed-off-by: Gourav <gourav.saini.phe22@iitbhu.ac.in>
  • Loading branch information
GauravSaini01 committed Jan 25, 2025
1 parent 88f8b0e commit 9c9f497
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/commands/optimize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,19 @@ export default class Optimize extends Command {
} catch (err:any) {
if (err.message.includes('Failed to download')) {
throw new Error('Proxy Connection Error: Unable to establish a connection to the proxy check hostName or PortNumber.');
} else if (filePath) {
this.error(
new ValidationError({
type: 'invalid-file',
filepath: filePath,
})
);
} else {
if(filePath){
this.error(
new ValidationError({
type: 'invalid-file',
filepath: filePath,
})
);
}else{
this.error(
new ValidationError({
type: 'no-spec-found'
})
);
}
this.error(
new ValidationError({
type: 'no-spec-found'
})
);
}
}

Expand Down

0 comments on commit 9c9f497

Please sign in to comment.