Skip to content

Commit f371b98

Browse files
author
Kapil Borle
committed
Use Settings class to parse input settings
1 parent a46da26 commit f371b98

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,16 @@ protected override void BeginProcessing()
273273

274274
if (settingsMode != SettingsMode.None)
275275
{
276-
var settingFileHasErrors = !ScriptAnalyzer.Instance.ParseProfile(settingsFound, this.SessionState.Path, this);
277-
if (settingFileHasErrors)
276+
try
278277
{
279-
this.WriteWarning("Cannot parse settings. Will abort the invocation.");
280-
stopProcessing = true;
281-
return;
278+
var settingsObj = new Settings(settingsFound);
279+
ScriptAnalyzer.Instance.UpdateSettings(settingsObj);
280+
}
281+
catch
282+
{
283+
this.WriteWarning("Cannot parse settings. Will abort the invocation.");
284+
stopProcessing = true;
285+
return;
282286
}
283287
}
284288

0 commit comments

Comments
 (0)