99using System . Text . RegularExpressions ;
1010using System . Threading . Tasks ;
1111using Bullseye ;
12- using Bullseye . Internal ;
1312using static Bullseye . Targets ;
14- using OperatingSystem = Bullseye . Internal . OperatingSystem ;
1513
1614namespace build
1715{
@@ -136,18 +134,18 @@ static async Task<int> Main(string[] args)
136134
137135 var ( specifiedTargets , options , unknownOptions , showHelp ) = CommandLine . Parse ( filteredArguments ) ;
138136 verbose = options . Verbose ;
139- Host = options . Host . DetectIfAutomatic ( ) ;
137+ Host = options . Host . DetectIfNull ( ) ;
140138
141- var operatingSystem =
139+ var osPlatform =
142140 RuntimeInformation . IsOSPlatform ( OSPlatform . Windows )
143- ? OperatingSystem . Windows
141+ ? OSPlatform . Windows
144142 : RuntimeInformation . IsOSPlatform ( OSPlatform . Linux )
145- ? OperatingSystem . Linux
143+ ? OSPlatform . Linux
146144 : RuntimeInformation . IsOSPlatform ( OSPlatform . OSX )
147- ? OperatingSystem . MacOS
148- : OperatingSystem . Unknown ;
145+ ? OSPlatform . OSX
146+ : OSPlatform . Create ( " Unknown" ) ;
149147
150- palette = new Palette ( options . NoColor , options . NoExtendedChars , options . Host , operatingSystem ) ;
148+ palette = new Palette ( options . NoColor , options . NoExtendedChars , Host , osPlatform ) ;
151149
152150 var targets = specifiedTargets . ToList ( ) ;
153151
@@ -209,9 +207,9 @@ static async Task<int> Main(string[] args)
209207 if ( showHelp )
210208 {
211209 Console . WriteLine ( ) ;
212- Console . WriteLine ( $ "{ palette . Default } Additional options:") ;
213- Console . WriteLine ( $ " { palette . Option } --no-prerelease { palette . Default } Force the current version to be considered final{ palette . Reset } ") ;
214- Console . WriteLine ( $ " { palette . Option } --version=<version> { palette . Default } Force the current version to equal to the specified value{ palette . Reset } ") ;
210+ Console . WriteLine ( $ "{ palette . Text } Additional options:") ;
211+ Console . WriteLine ( $ " { palette . Option } --no-prerelease { palette . Text } Force the current version to be considered final{ palette . Default } ") ;
212+ Console . WriteLine ( $ " { palette . Option } --version=<version> { palette . Text } Force the current version to equal to the specified value{ palette . Default } ") ;
215213 }
216214
217215 return exitCode ;
@@ -227,12 +225,12 @@ public static void WriteVerbose(string text)
227225
228226 public static void WriteInformation ( string text )
229227 {
230- Console . WriteLine ( $ " { palette . Default } (i) { text } { palette . Reset } ") ;
228+ Console . WriteLine ( $ " { palette . Text } (i) { text } { palette . Default } ") ;
231229 }
232230
233231 public static void WriteWarning ( string text )
234232 {
235- Console . WriteLine ( $ " { palette . Option } /!\\ { text } { palette . Reset } ") ;
233+ Console . WriteLine ( $ " { palette . Option } /!\\ { text } { palette . Default } ") ;
236234 }
237235
238236 public static void WriteImportant ( string text )
@@ -300,7 +298,7 @@ private static IEnumerable<string> WrapText(string text, int length)
300298
301299 private static void Write ( string text , string color )
302300 {
303- Console . WriteLine ( $ "{ color } { text } { palette . Reset } ") ;
301+ Console . WriteLine ( $ "{ color } { text } { palette . Default } ") ;
304302 }
305303
306304 public static IEnumerable < string > ReadLines ( string name , string ? args = null , string ? workingDirectory = null ) => SimpleExec . Command
0 commit comments