Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit b013619

Browse files
committed
Tidy
1 parent 6ddf1d1 commit b013619

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/SpecFlow.NetCore/Args.cs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,21 @@ public Args(string[] args)
2222
{
2323
WorkingDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
2424

25-
// Command line arguments are required. If absent, exit.
2625
if (args == null || !args.Any())
27-
{
2826
return;
29-
}
3027

3128
// establish a dictionary of all good command line variables
32-
var argDictionary = new Dictionary<string, string>()
29+
var argDictionary = new Dictionary<string, string>
3330
{
34-
{SpecFlowPathArgName , null},
35-
{WorkingDirectoryArgName, null },
36-
{TestFrameworkArgName, null },
37-
{ToolsVersionArgName, null }
31+
{ SpecFlowPathArgName, null },
32+
{ WorkingDirectoryArgName, null },
33+
{ TestFrameworkArgName, null },
34+
{ ToolsVersionArgName, null }
3835
};
3936

40-
4137
string lastKey = null;
42-
// loop through all arguments, attempting to detect and fix bad values
43-
foreach(string arg in args)
38+
39+
foreach (var arg in args)
4440
{
4541
if (argDictionary.ContainsKey(arg))
4642
{
@@ -70,9 +66,7 @@ public Args(string[] args)
7066
case WorkingDirectoryArgName:
7167
var path = string.IsNullOrEmpty(argDictionary[key]) ? Directory.GetCurrentDirectory() : argDictionary[key];
7268
if (!Directory.Exists(path))
73-
{
7469
throw new Exception("Working directory doesn't exist: " + path);
75-
}
7670
WorkingDirectory = new DirectoryInfo(path);
7771
break;
7872

@@ -92,4 +86,4 @@ public Args(string[] args)
9286
WriteLine("ToolsVersion: " + ToolsVersion);
9387
}
9488
}
95-
}
89+
}

0 commit comments

Comments
 (0)