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 =
20472047 __. MarkSuccess()
20482048
20492049 /// <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
20512051 /// </summary>
20522052 ///
20532053 /// <param name="templateName">template short name to uninstall</param>
20542054 /// <param name="setParams">set version command parameters</param>
20552055 let uninstallTemplate templateName =
2056- use __ = Trace.traceTask " DotNet:new" " dotnet new -- uninstall command"
2056+ use __ = Trace.traceTask " DotNet:new" " dotnet new uninstall command"
20572057 let param = TemplateUninstallOptions.Create( templateName)
20582058 let args = buildTemplateUninstallArgs param
20592059 let result = execArgsList ( fun _ -> param.Common) " new" args
@@ -2070,6 +2070,6 @@ module DotNet =
20702070
20712071 match success with
20722072 | 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}"
20742074
20752075 __. MarkSuccess()
Original file line number Diff line number Diff line change @@ -122,14 +122,14 @@ let tests =
122122
123123 Expect.equal cli expected " New --install args generated correctly."
124124
125- testCase " Test that the dotnet new -- uninstall command works as expected"
125+ testCase " Test that the dotnet new uninstall command works as expected"
126126 <| fun _ ->
127127 let param = DotNet.TemplateUninstallOptions.Create( " my-awesome-template" )
128128 let cli = param |> DotNet.buildTemplateUninstallArgs |> Args.toWindowsCommandLine
129129
130- let expected = " -- uninstall my-awesome-template"
130+ let expected = " uninstall my-awesome-template"
131131
132- Expect.equal cli expected " New -- uninstall args generated correctly."
132+ Expect.equal cli expected " New uninstall args generated correctly."
133133
134134 testCase " Test buildAfterArgs with no after args"
135135 <| fun _ ->
Original file line number Diff line number Diff line change @@ -132,16 +132,6 @@ let fileExists dir fileName =
132132let setupTemplate () =
133133 Process.setEnableProcessTracing true
134134
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-
145135 let templateNupkg =
146136 GlobbingPattern.create " ../../../release/dotnetcore/fake-template.*.nupkg"
147137 |> GlobbingPattern.setBaseDir __ SOURCE_ DIRECTORY__
@@ -154,6 +144,16 @@ let setupTemplate () =
154144 | Some t -> t
155145 | Option.None -> templatePackageName
156146
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+
157157 try
158158 DotNet.installTemplate fakeTemplateName id
159159 with exn ->
You can’t perform that action at this time.
0 commit comments