Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-89) Remove shims #1947

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nuget/chocolatey/tools/chocolateysetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ param(

$from = "$chocolateyPathOld\bin"
$to = "$chocolateyPath\bin"
$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", "RefreshEnv.cmd")
Get-ChildItem -Path $from -recurse -Exclude $exclude |
% {
Write-Debug "Copying $_ `n to $to"
Expand Down
2 changes: 1 addition & 1 deletion setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ if(-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall")){
iex ((new-object net.webclient).DownloadString("https://chocolatey.org/install.ps1"))
}

cinst pester -version 2.0.2
choco install pester -version 2.0.2
14 changes: 0 additions & 14 deletions src/chocolatey.resources/chocolatey.resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,13 @@
<EmbeddedResource Include="helpers\functions\Write-FileUpdateLog.ps1" />
<EmbeddedResource Include="redirects\choco.exe.ignore" />
<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" />
<EmbeddedResource Include="redirects\cver.exe.ignore" />
<EmbeddedResource Include="tools\checksum.exe.ignore" />
<EmbeddedResource Include="tools\shimgen.exe.ignore" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LICENSE.txt" />
<EmbeddedResource Include="redirects\choco.exe" />
<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" />
<EmbeddedResource Include="redirects\cver.exe" />
<EmbeddedResource Include="tools\7zip.license.txt" />
<EmbeddedResource Include="tools\checksum.exe" />
<EmbeddedResource Include="tools\checksum.license.txt" />
Expand Down
Binary file removed src/chocolatey.resources/redirects/cinst.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/clist.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/cpack.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/cpush.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/cuninst.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/cup.exe
Binary file not shown.
Empty file.
Binary file removed src/chocolatey.resources/redirects/cver.exe
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,7 @@ compatibility across different versions and editions of Chocolatey.
Following this guide will ensure your experience is not frustrating
based on choco not receiving things you think you are passing to it.

* For consistency, always use `choco`, not `choco.exe`. Never use
shortcut commands like `cinst` or `cup`.
* For consistency, always use `choco`, not `choco.exe`.
* Always have the command as the first argument to `choco. e.g.
`choco install`, where `install` is the command.
* If there is a subcommand, ensure that is the second argument. e.g.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
this.Log().Info(ChocolateyLoggers.Important, "Install Command");
this.Log().Info(@"
Installs a package or a list of packages (sometimes specified as a
packages.config). Some may prefer to use `cinst` as a shortcut for
`choco install`.
packages.config).

NOTE: 100% compatible with older chocolatey client (0.9.8.32 and below)
with options and switches. Add `-y` for previous behavior with no
Expand All @@ -250,7 +249,6 @@ prompt. In most cases you can still pass options and switches with one
"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
choco install <pkg|packages.config> [<pkg2> <pkgN>] [<options/switches>]
cinst <pkg|packages.config> [<pkg2> <pkgN>] [<options/switches>]

NOTE: `all` is a special package keyword that will allow you to install
all packages from a custom feed. Will not work with Chocolatey default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "List/Search Command");
this.Log().Info(@"
Chocolatey will perform a search for a package local or remote. Some
may prefer to use `clist` as a shortcut for `choco list`.
Chocolatey will perform a search for a package local or remote.

NOTE: 100% compatible with older Chocolatey client (0.9.8.x and below)
with options and switches. In most cases you can still pass options
Expand All @@ -164,7 +163,6 @@ the command reference (`choco -?`).
"chocolatey".Log().Info(@"
choco search <filter> [<options/switches>]
choco list <filter> [<options/switches>]
clist <filter> [<options/switches>]
");

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples");
Expand Down
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,9 +91,6 @@ 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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "Push Command");
this.Log().Info(@"
Chocolatey will attempt to push a compiled nupkg to a package feed.
Some may prefer to use `cpush` as a shortcut for `choco push`.
Chocolatey will attempt to push a compiled nupkg to a package feed.

NOTE: 100% compatible with older chocolatey client (0.9.8.32 and below)
with options and switches. Default push location is deprecated and
Expand All @@ -165,7 +164,6 @@ the command reference (`choco -?`).
"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
choco push [<path to nupkg>] [<options/switches>]
cpush [<path to nupkg>] [<options/switches>]

NOTE: If there is more than one nupkg file in the folder, the command
will require specifying the path to the file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "Uninstall Command");
this.Log().Info(@"
Uninstalls a package or a list of packages. Some may prefer to use
`cuninst` as a shortcut for `choco uninstall`.
Uninstalls a package or a list of packages.

NOTE: 100% compatible with older chocolatey client (0.9.8.32 and below)
with options and switches. Add `-y` for previous behavior with no
Expand Down Expand Up @@ -207,7 +206,6 @@ to determine how to automatically uninstall software.
"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
choco uninstall <pkg|all> [pkg2 pkgN] [options/switches]
cuninst <pkg|all> [pkg2 pkgN] [options/switches]

NOTE: `all` is a special package keyword that will allow you to
uninstall all packages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ public virtual void help_message(ChocolateyConfiguration configuration)
{
this.Log().Info(ChocolateyLoggers.Important, "Upgrade Command");
this.Log().Info(@"
Upgrades a package or a list of packages. Some may prefer to use `cup`
as a shortcut for `choco upgrade`. If you do not have a package
Upgrades a package or a list of packages. If you do not have a package
installed, upgrade will install it.

NOTE: 100% compatible with older Chocolatey client (0.9.8.x and below)
Expand All @@ -282,7 +281,6 @@ prompt. In most cases you can still pass options and switches with one
"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
choco upgrade <pkg|all> [<pkg2> <pkgN>] [<options/switches>]
cup <pkg|all> [<pkg2> <pkgN>] [<options/switches>]

NOTE: `all` is a special package keyword that will allow you to upgrade
all currently installed packages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace chocolatey.infrastructure.app.commands
using logging;
using services;

[CommandFor("version", "[DEPRECATED] will be removed in v1 - use `choco outdated` or `cup <pkg|all> -whatif` instead")]
[CommandFor("version", "[DEPRECATED] will be removed in v1 - use `choco outdated` or `choco upgrade <pkg|all> -whatif` instead")]
public class ChocolateyVersionCommand : ChocolateyUpgradeCommand
{
private readonly IChocolateyPackageService _packageService;
Expand Down