Skip to content

Commit

Permalink
Merge pull request #611 from meza/hotfix
Browse files Browse the repository at this point in the history
fix: the add command does not report an error now
  • Loading branch information
meza authored Aug 23, 2024
2 parents 8192966 + d0afe6a commit e874dda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const add = async (platform: Platform, id: string, options: AddOptions, l
const modConfig = configuration.mods.find((mod: Mod) => mod.id === id && mod.type === platform);

if (modConfig) {
performance.mark('add-failed');
logger.debug(`Mod ${id} for ${platform} already exists in the configuration`);
await telemetry.captureCommand({
command: 'add',
Expand All @@ -72,7 +73,7 @@ export const add = async (platform: Platform, id: string, options: AddOptions, l
extra: {
flag: 'already-exists'
},
duration: performance.measure('add-duration', 'add-start', 'add-succeed').duration
duration: performance.measure('add-duration', 'add-start', 'add-failed').duration
});
return;
}
Expand Down

0 comments on commit e874dda

Please sign in to comment.