File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { dim } from 'ansis'
55import { createDebug } from 'obug'
66import { exec } from 'tinyexec'
77import { fsRemove } from '../../utils/fs.ts'
8- import { importWithError } from '../../utils/general.ts'
8+ import { importWithError , slash } from '../../utils/general.ts'
99import type { ResolvedConfig } from '../../config/index.ts'
1010import type {
1111 CheckPackageOptions ,
@@ -105,7 +105,9 @@ export async function attw(options: ResolvedConfig): Promise<void> {
105105 } )
106106
107107 if ( problems . length ) {
108- const problemList = problems . map ( formatProblem ) . join ( '\n' )
108+ const problemList = problems
109+ . map ( ( problem ) => formatProblem ( checkResult . packageName , problem ) )
110+ . join ( '\n' )
109111 errorMessage = `problems found:\n${ problemList } `
110112 }
111113 } else {
@@ -127,10 +129,13 @@ export async function attw(options: ResolvedConfig): Promise<void> {
127129/**
128130 * Format an ATTW problem for display
129131 */
130- function formatProblem ( problem : Problem ) : string {
132+ function formatProblem ( packageName : string , problem : Problem ) : string {
131133 const resolutionKind =
132134 'resolutionKind' in problem ? ` (${ problem . resolutionKind } )` : ''
133- const entrypoint = 'entrypoint' in problem ? ` at ${ problem . entrypoint } ` : ''
135+ const entrypoint =
136+ 'entrypoint' in problem
137+ ? ` at ${ slash ( path . join ( packageName , problem . entrypoint ) ) } `
138+ : ''
134139
135140 switch ( problem . kind ) {
136141 case 'NoResolution' :
You can’t perform that action at this time.
0 commit comments