Skip to content

Commit

Permalink
(#89) Remove cpack shim for choco pack
Browse files Browse the repository at this point in the history
There are known incompatibilities with this shim when other applications
are installed on the machine, for example cmake. Since we are moving
towards usage of a ubiquitous choco command, removing this shim makes
a lot of sense.
  • Loading branch information
gep13 authored and AdmiringWorm committed Mar 14, 2022
1 parent 66281ed commit ee6047a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nuget/chocolatey/tools/chocolateysetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ param(
$from = "$chocolateyPathOld\bin"
$to = "$chocolateyPath\bin"
# TODO: This exclusion list needs to be updated once shims are removed
$exclude = @("choco.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpack.exe", "cpush.exe", "cuninst.exe", "cup.exe", "cver.exe", "RefreshEnv.cmd")
$exclude = @("choco.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpush.exe", "cuninst.exe", "cup.exe", "cver.exe", "RefreshEnv.cmd")
Get-ChildItem -Path $from -recurse -Exclude $exclude |
% {
Write-Debug "Copying $_ `n to $to"
Expand Down
2 changes: 0 additions & 2 deletions src/chocolatey.resources/chocolatey.resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
<EmbeddedResource Include="redirects\chocolatey.exe.ignore" />
<EmbeddedResource Include="redirects\cinst.exe.ignore" />
<EmbeddedResource Include="redirects\clist.exe.ignore" />
<EmbeddedResource Include="redirects\cpack.exe.ignore" />
<EmbeddedResource Include="redirects\cpush.exe.ignore" />
<EmbeddedResource Include="redirects\cuninst.exe.ignore" />
<EmbeddedResource Include="redirects\cup.exe.ignore" />
Expand All @@ -102,7 +101,6 @@
<EmbeddedResource Include="redirects\chocolatey.exe" />
<EmbeddedResource Include="redirects\cinst.exe" />
<EmbeddedResource Include="redirects\clist.exe" />
<EmbeddedResource Include="redirects\cpack.exe" />
<EmbeddedResource Include="redirects\cpush.exe" />
<EmbeddedResource Include="redirects\cuninst.exe" />
<EmbeddedResource Include="redirects\cup.exe" />
Expand Down
Binary file removed src/chocolatey.resources/redirects/cpack.exe
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "Pack Command");
this.Log().Info(@"
Chocolatey will attempt to package a nuspec into a compiled nupkg. Some
may prefer to use `cpack` as a shortcut for `choco pack`.
Chocolatey will attempt to package a nuspec into a compiled nupkg.
NOTE: 100% compatible with older chocolatey client (0.9.8.32 and below)
with options and switches. In most cases you can still pass options
Expand All @@ -92,15 +91,11 @@ the command reference (`choco -?`).
NOTE: You can pass arbitrary property value pairs through to nuspecs.
These will replace variables formatted as `$property$` with the value passed.
NOTE: `cpack` has been deprecated as it has a name collision with CMake. Please
use `choco pack` instead. The shortcut will be removed in v1.
");

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
choco pack [<path to nuspec>] [<options/switches>] [<property=value>]
cpack [<path to nuspec>] [<options/switches>] (DEPRECATED)
");

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples");
Expand Down

0 comments on commit ee6047a

Please sign in to comment.