@@ -375,10 +375,11 @@ public async Task<bool> BundleChangelogs(IDiagnosticsCollector collector, Bundle
375375 {
376376 // Resolution order: bundle.output_directory → input.OutputDirectory (programmatic override)
377377 // → bundle.directory → CWD
378- var outputDir = config . Bundle . OutputDirectory
378+ var outputDir = ( config . Bundle . OutputDirectory
379379 ?? input . OutputDirectory
380380 ?? config . Bundle . Directory
381- ?? _fileSystem . Directory . GetCurrentDirectory ( ) ;
381+ ?? _fileSystem . Directory . GetCurrentDirectory ( ) )
382+ . Replace ( '/' , _fileSystem . Path . DirectorySeparatorChar ) ;
382383 outputPath = _fileSystem . Path . Join ( outputDir , outputPattern ) ;
383384 }
384385
@@ -418,18 +419,18 @@ public async Task<bool> BundleChangelogs(IDiagnosticsCollector collector, Bundle
418419 } ;
419420 }
420421
421- private static BundleChangelogsArguments ApplyConfigDefaults ( BundleChangelogsArguments input , ChangelogConfiguration ? config )
422+ private BundleChangelogsArguments ApplyConfigDefaults ( BundleChangelogsArguments input , ChangelogConfiguration ? config )
422423 {
423424 // Apply directory: CLI takes precedence. Only use config when --directory not specified.
424- var directory = input . Directory ?? config ? . Bundle ? . Directory ?? Directory . GetCurrentDirectory ( ) ;
425+ var directory = input . Directory ?? config ? . Bundle ? . Directory ?? _fileSystem . Directory . GetCurrentDirectory ( ) ;
425426
426427 if ( config ? . Bundle == null )
427428 return input with { Directory = directory , LinkAllowRepos = null } ;
428429
429430 // Apply output default when --output not specified: use bundle.output_directory if set
430431 var output = input . Output ;
431432 if ( string . IsNullOrWhiteSpace ( output ) && ! string . IsNullOrWhiteSpace ( config . Bundle . OutputDirectory ) )
432- output = Path . Join ( config . Bundle . OutputDirectory , "changelog-bundle.yaml" ) ;
433+ output = _fileSystem . Path . Join ( config . Bundle . OutputDirectory . Replace ( '/' , _fileSystem . Path . DirectorySeparatorChar ) , "changelog-bundle.yaml" ) ;
433434
434435 // Apply resolve: CLI takes precedence over config. Only use config when CLI did not specify.
435436 var resolve = input . Resolve ?? config . Bundle . Resolve ;
@@ -500,13 +501,14 @@ private static BundleChangelogsArguments ApplyConfigDefaults(BundleChangelogsArg
500501 var outputPattern = profileDef . Output
501502 . Replace ( "{version}" , version )
502503 . Replace ( "{lifecycle}" , lifecycle ) ;
503- var outputDir = config ? . Bundle ? . OutputDirectory
504+ var outputDir = ( config ? . Bundle ? . OutputDirectory
504505 ?? config ? . Bundle ? . Directory
505- ?? _fileSystem . Directory . GetCurrentDirectory ( ) ;
506+ ?? _fileSystem . Directory . GetCurrentDirectory ( ) )
507+ . Replace ( '/' , _fileSystem . Path . DirectorySeparatorChar ) ;
506508 outputPath = _fileSystem . Path . Join ( outputDir , outputPattern ) ;
507509 }
508510 else if ( string . IsNullOrWhiteSpace ( outputPath ) && config ? . Bundle ? . OutputDirectory != null )
509- outputPath = _fileSystem . Path . Join ( config . Bundle . OutputDirectory , "changelog-bundle.yaml" ) ;
511+ outputPath = _fileSystem . Path . Join ( config . Bundle . OutputDirectory . Replace ( '/' , _fileSystem . Path . DirectorySeparatorChar ) , "changelog-bundle.yaml" ) ;
510512
511513 return new BundlePlanResult
512514 {
0 commit comments