File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Source/Boxed.DotnetNewTest Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public static class TempDirectoryExtensions
2525 public static async Task < Project > DotnetNewAsync (
2626 this TempDirectory tempDirectory ,
2727 string templateName ,
28- string name ,
28+ string name = null ,
2929 IDictionary < string , string > arguments = null ,
3030 TimeSpan ? timeout = null ,
3131 bool showShellWindow = false )
@@ -35,7 +35,13 @@ public static async Task<Project> DotnetNewAsync(
3535 throw new ArgumentNullException ( nameof ( tempDirectory ) ) ;
3636 }
3737
38- var stringBuilder = new StringBuilder ( $ "new { templateName } --name \" { name } \" ") ;
38+ var stringBuilder = new StringBuilder ( $ "new { templateName } ") ;
39+
40+ if ( name != null )
41+ {
42+ stringBuilder . Append ( $ " --name \" { name } \" ") ;
43+ }
44+
3945 if ( arguments is object )
4046 {
4147 foreach ( var argument in arguments )
You can’t perform that action at this time.
0 commit comments