This repository was archived by the owner on Feb 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Microsoft.Content.Build.Code2Yaml.Steps Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ select g
59
59
{
60
60
using ( var reader = new StreamReader ( outputPath ) )
61
61
{
62
- var oldMapping = new YamlDeserializer ( ) . Deserialize < ServiceMapping > ( reader ) ;
62
+ var oldMapping = new YamlDeserializer ( ignoreUnmatched : true ) . Deserialize < ServiceMapping > ( reader ) ;
63
63
foreach ( var m in oldMapping [ 0 ] . items )
64
64
{
65
65
if ( m . name == "Other" )
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ class Program
18
18
{
19
19
private static ConfigModel _config ;
20
20
21
- static void Main ( string [ ] args )
21
+ static int Main ( string [ ] args )
22
22
{
23
23
if ( ! ValidateConfig ( args ) )
24
24
{
25
- return ;
25
+ return 1 ;
26
26
}
27
27
var context = new BuildContext ( ) ;
28
28
context . SetSharedObject ( Constants . Constants . Config , _config ) ;
@@ -38,12 +38,12 @@ static void Main(string[] args)
38
38
new GenerateArticles { Generator = ArticleGeneratorFactory . Create ( _config . Language ) } ,
39
39
new GenerateServiceMappingFile ( ) ) ,
40
40
} ) ) ;
41
- string status = "Failed" ;
41
+ var status = 1 ;
42
42
var watch = Stopwatch . StartNew ( ) ;
43
43
try
44
44
{
45
45
procedure . RunAsync ( context ) . Wait ( ) ;
46
- status = "Succeeded" ;
46
+ status = 0 ;
47
47
}
48
48
catch
49
49
{
@@ -53,7 +53,9 @@ static void Main(string[] args)
53
53
{
54
54
watch . Stop ( ) ;
55
55
}
56
- Console . WriteLine ( $ "{ status } in { watch . ElapsedMilliseconds } milliseconds.") ;
56
+ var statusString = status == 0 ? "Succeeded" : "Failed" ;
57
+ Console . WriteLine ( $ "{ statusString } in { watch . ElapsedMilliseconds } milliseconds.") ;
58
+ return status ;
57
59
}
58
60
59
61
private static bool ValidateConfig ( string [ ] args )
You can’t perform that action at this time.
0 commit comments