Skip to content

Commit

Permalink
fix: log success per codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Aug 7, 2024
1 parent 97ce1ab commit 76750a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ async function fixFile(
}
});

cl.log.success(dedent`
Applying codemod ${pc.cyan(replacement.moduleName)} to ${scanResult.path}
`);

newContent = transformResult;
} catch (err) {
cl.log.error(dedent`
Expand All @@ -189,10 +193,6 @@ async function fixFile(
}

if (scanResult.contents !== newContent) {
cl.log.success(dedent`
Writing file ${scanResult.path} with codemod changes.
`);

await writeFile(scanResult.path, newContent, 'utf8');
}
}
Expand Down

0 comments on commit 76750a2

Please sign in to comment.