99using System . Threading ;
1010using System . Threading . Tasks ;
1111using System . Xml . Linq ;
12- using Devlooped ;
1312using Mono . Options ;
1413using Spectre . Console ;
1514using Spectre . Console . Rendering ;
@@ -29,46 +28,10 @@ class Program
2928 string items ;
3029 List < string > extra ;
3130
32- static async Task < int > Main ( string [ ] args )
31+ static int Main ( string [ ] args )
3332 {
34- var status = SponsorCheck . CheckAsync ( Directory . GetCurrentDirectory ( ) , "devlooped" , "NuGetizer" , "dotnet-nugetize" , ThisAssembly . Project . Version ) ;
35- var result = new Program ( ) . Run ( args ) ;
36-
37- // No need to check sponsorlink status if we couldn't render useful results.
38- if ( result == 0 )
39- {
40- var value = await status ;
41- if ( value == null )
42- return result ;
43-
44- switch ( value . Value )
45- {
46- case SponsorStatus . AppMissing :
47- Warning (
48- AppMissing . Header ,
49- new Markup ( AppMissing . Message1 ( "NuGetizer" , "devlooped" ) ) ,
50- new Grid ( ) . AddColumns ( 2 )
51- . AddRow (
52- new Markup ( AppMissing . Message2 ) ,
53- new Text ( "https://github.com/apps/sponsorlink" ,
54- new Style ( Color . Blue , decoration : Decoration . Underline , link : "https://github.com/apps/sponsorlink" ) ) ) ) ;
55- break ;
56- case SponsorStatus . NotSponsoring :
57- Warning (
58- NotSponsoring . Header ,
59- new Markup ( NotSponsoring . Message ( "NuGetizer" ) ) ,
60- new Text ( "https://github.com/sponsors/devlooped" ,
61- new Style ( Color . Blue , decoration : Decoration . Underline , link : "https://github.com/apps/sponsorlink" ) ) ) ;
62- break ;
63- case SponsorStatus . Sponsoring :
64- AnsiConsole . Write ( new Markup ( $ ":heart_decoration: [grey30]{ Sponsoring . Message ( "NuGetizer" , "devlooped" ) } [/]") ) ;
65- break ;
66- default :
67- break ;
68- }
69- }
70-
71- return result ;
33+ Console . OutputEncoding = Encoding . Unicode ;
34+ return new Program ( ) . Run ( args ) ;
7235 }
7336
7437 int Run ( string [ ] args )
0 commit comments