|
1 | 1 | using Moryx.Cli.Commands.Options; |
2 | 2 | using Moryx.Cli.Templates.Extensions; |
3 | | -using System.Diagnostics.CodeAnalysis; |
4 | 3 | using Moryx.Cli.Commands.Extensions; |
5 | 4 | using Moryx.Cli.Templates; |
6 | 5 |
|
7 | 6 | namespace Moryx.Cli.Commands |
8 | 7 | { |
9 | 8 | public static class CreateNew |
10 | 9 | { |
11 | | - public static CommandResult Solution(NewOptions options, [NotNull] Action<string> onStatus) |
| 10 | + public static CommandResult Solution(NewOptions options, Action<string> onStatus) |
12 | 11 | { |
13 | 12 | var solutionName = options.Name!; |
14 | 13 | var dir = Path.Combine(Directory.GetCurrentDirectory(), solutionName); |
@@ -86,12 +85,12 @@ private static void InitializeGitRepo(string solutionName, Action<string> onStat |
86 | 85 | { |
87 | 86 | var initialDirectory = Environment.CurrentDirectory; |
88 | 87 | Directory.SetCurrentDirectory(Path.Combine(Environment.CurrentDirectory, solutionName)); |
89 | | - var result = TemplateRepository.ExecCommanLine("git init", onStatus); |
| 88 | + var result = TemplateRepository.ExecCommandLine("git init", onStatus); |
90 | 89 | if (result == 0) |
91 | 90 | { |
92 | | - TemplateRepository.ExecCommanLine("git checkout -b main", onStatus); |
93 | | - TemplateRepository.ExecCommanLine("git add --all", onStatus); |
94 | | - TemplateRepository.ExecCommanLine($"git commit -am \"Initial commit for {solutionName}\"", onStatus); |
| 91 | + TemplateRepository.ExecCommandLine("git checkout -b main", onStatus); |
| 92 | + TemplateRepository.ExecCommandLine("git add --all", onStatus); |
| 93 | + TemplateRepository.ExecCommandLine($"git commit -am \"Initial commit for {solutionName}\"", onStatus); |
95 | 94 | onStatus("Initialized Git repository"); |
96 | 95 | } |
97 | 96 | else |
|
0 commit comments