File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ CancellationToken cancellationToken
228228
229229 async Task FormatFile (
230230 string actualFilePath ,
231- string originalFilePath ,
231+ string ? originalFilePath = null ,
232232 bool warnForUnsupported = false
233233 )
234234 {
@@ -247,6 +247,11 @@ async Task FormatFile(
247247 cancellationToken
248248 ) ;
249249
250+ originalFilePath ??= actualFilePath . Replace (
251+ directoryOrFilePath ,
252+ originalDirectoryOrFile
253+ ) ;
254+
250255 if ( printerOptions is { Formatter : not Formatter . Unknown } )
251256 {
252257 printerOptions . IncludeGenerated = commandLineOptions . IncludeGenerated ;
@@ -298,9 +303,7 @@ await FormatPhysicalFile(
298303 "*.*" ,
299304 SearchOption . AllDirectories
300305 )
301- . Select ( o =>
302- FormatFile ( o , o . Replace ( directoryOrFilePath , originalDirectoryOrFile ) )
303- )
306+ . Select ( o => FormatFile ( o ) )
304307 . ToArray ( ) ;
305308 try
306309 {
You can’t perform that action at this time.
0 commit comments