Skip to content

Commit 5d4d166

Browse files
committed
Fix up formatly report handling
1 parent 63dacd5 commit 5d4d166

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/knip/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
165165
const touchedFiles = await fixer.fixIssues(issues);
166166
if (isFormat) {
167167
const report = await formatly(Array.from(touchedFiles), { cwd });
168-
if (report.ran && report.result.code === 0) {
168+
if (report.ran && report.result && (report.result.runner === 'virtual' || report.result.code === 0)) {
169169
debugLogArray('*', `Formatted files using ${report.formatter.name} (${report.formatter.runner})`, touchedFiles);
170170
} else {
171171
debugLogObject('*', 'Formatting files failed', report);

0 commit comments

Comments
 (0)