File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed
Fake.DotNet.Cli.IntegrationTests Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -2047,13 +2047,13 @@ module DotNet =
2047
2047
__. MarkSuccess()
2048
2048
2049
2049
/// <summary>
2050
- /// Execute dotnet new <c>-- uninstall <PATH|NUGET_ID></c> command to uninstall a new template
2050
+ /// Execute dotnet new <c>uninstall <PATH|NUGET_ID></c> command to uninstall a new template
2051
2051
/// </summary>
2052
2052
///
2053
2053
/// <param name="templateName">template short name to uninstall</param>
2054
2054
/// <param name="setParams">set version command parameters</param>
2055
2055
let uninstallTemplate templateName =
2056
- use __ = Trace.traceTask " DotNet:new" " dotnet new -- uninstall command"
2056
+ use __ = Trace.traceTask " DotNet:new" " dotnet new uninstall command"
2057
2057
let param = TemplateUninstallOptions.Create( templateName)
2058
2058
let args = buildTemplateUninstallArgs param
2059
2059
let result = execArgsList ( fun _ -> param.Common) " new" args
@@ -2070,6 +2070,6 @@ module DotNet =
2070
2070
2071
2071
match success with
2072
2072
| true -> ()
2073
- | false -> failwithf $" dotnet new -- uninstall failed with code %i {result.ExitCode}"
2073
+ | false -> failwithf $" dotnet new uninstall failed with code %i {result.ExitCode}"
2074
2074
2075
2075
__. MarkSuccess()
Original file line number Diff line number Diff line change @@ -122,14 +122,14 @@ let tests =
122
122
123
123
Expect.equal cli expected " New --install args generated correctly."
124
124
125
- testCase " Test that the dotnet new -- uninstall command works as expected"
125
+ testCase " Test that the dotnet new uninstall command works as expected"
126
126
<| fun _ ->
127
127
let param = DotNet.TemplateUninstallOptions.Create( " my-awesome-template" )
128
128
let cli = param |> DotNet.buildTemplateUninstallArgs |> Args.toWindowsCommandLine
129
129
130
- let expected = " -- uninstall my-awesome-template"
130
+ let expected = " uninstall my-awesome-template"
131
131
132
- Expect.equal cli expected " New -- uninstall args generated correctly."
132
+ Expect.equal cli expected " New uninstall args generated correctly."
133
133
134
134
testCase " Test buildAfterArgs with no after args"
135
135
<| fun _ ->
Original file line number Diff line number Diff line change @@ -132,16 +132,6 @@ let fileExists dir fileName =
132
132
let setupTemplate () =
133
133
Process.setEnableProcessTracing true
134
134
135
- try
136
- DotNet.uninstallTemplate templatePackageName
137
- with exn ->
138
- $" should clear out preexisting templates\n Debugging Info: {getDebuggingInfo ()}"
139
- |> Expect.isTrue false
140
-
141
- printfn $" {Environment.CurrentDirectory}"
142
-
143
- DotNet.setupEnv dotnetSdk.Value
144
-
145
135
let templateNupkg =
146
136
GlobbingPattern.create " ../../../release/dotnetcore/fake-template.*.nupkg"
147
137
|> GlobbingPattern.setBaseDir __ SOURCE_ DIRECTORY__
@@ -154,6 +144,16 @@ let setupTemplate () =
154
144
| Some t -> t
155
145
| Option.None -> templatePackageName
156
146
147
+ try // Specs have changed: needs full package name: https://github.com/dotnet/docs/pull/3054
148
+ DotNet.uninstallTemplate fakeTemplateName
149
+ with exn ->
150
+ $" should clear out preexisting templates\n Debugging Info: {getDebuggingInfo ()}"
151
+ |> Expect.isTrue false
152
+
153
+ printfn $" {Environment.CurrentDirectory}"
154
+
155
+ DotNet.setupEnv dotnetSdk.Value
156
+
157
157
try
158
158
DotNet.installTemplate fakeTemplateName id
159
159
with exn ->
You can’t perform that action at this time.
0 commit comments