Skip to content

Commit

Permalink
Merge pull request #2466 from jsoref/spelling
Browse files Browse the repository at this point in the history
(#2465) Fix numerous spelling mistakes
  • Loading branch information
gep13 authored Jun 25, 2022
2 parents 89dc404 + 372ffa1 commit 6f3fc15
Show file tree
Hide file tree
Showing 41 changed files with 125 additions and 125 deletions.
20 changes: 10 additions & 10 deletions GenerateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,19 @@ function Convert-Syntax($objItem, $hasCmdletBinding) {
}

function Convert-Parameter($objItem, $commandName) {
$parmText = $lineFeed + "### -$($objItem.name.substring(0,1).ToUpper() + $objItem.name.substring(1))"
$paramText = $lineFeed + "### -$($objItem.name.substring(0,1).ToUpper() + $objItem.name.substring(1))"
if ( ($objItem.parameterValue -ne $null) -and ($objItem.parameterValue -ne 'SwitchParameter') ) {
$parmText += ' '
if ([string]($objItem.required) -eq 'false') { $parmText += "["}
$parmText += "<$($objItem.parameterValue)>"
if ([string]($objItem.required) -eq 'false') { $parmText += "]"}
$paramText += ' '
if ([string]($objItem.required) -eq 'false') { $paramText += "["}
$paramText += "<$($objItem.parameterValue)>"
if ([string]($objItem.required) -eq 'false') { $paramText += "]"}
}
$parmText += $lineFeed
$paramText += $lineFeed
if ($objItem.description -ne $null) {
$parmText += (($objItem.description | ForEach-Object { Replace-CommonItems $_.Text }) -join "$lineFeed") + $lineFeed + $lineFeed
}
if ($objItem.parameterValueGroup -ne $null) {
$parmText += "$($lineFeed)Valid options: " + ($objItem.parameterValueGroup.parameterValue -join ", ") + $lineFeed + $lineFeed
$paramText += "$($lineFeed)Valid options: " + ($objItem.parameterValueGroup.parameterValue -join ", ") + $lineFeed + $lineFeed
}

$aliases = [string]((Get-Command -Name $commandName).parameters."$($objItem.Name)".Aliases -join ', ')
Expand All @@ -179,7 +179,7 @@ function Convert-Parameter($objItem, $commandName) {

$padding = ($aliases.Length, $required.Length, $position.Length, $defValue.Length, $acceptPipeline.Length | Measure-Object -Maximum).Maximum

$parmText += @"
$paramText += @"
Property | Value
---------------------- | $([string]('-' * $padding))
Aliases | $($aliases)
Expand All @@ -190,7 +190,7 @@ Accept Pipeline Input? | $($acceptPipeline)
"@

Write-Output $parmText
Write-Output $paramText
}

function Convert-CommandText {
Expand Down Expand Up @@ -519,7 +519,7 @@ Some environment variables are set based on options that are passed, configurati
#### Business Edition Variables
* ChocolateyInstallArgumentsSensitive - Encrypted arguments passed from command line `--install-arguments-sensitive` that are not logged anywhere. (0.10.1+ and licensed editions 1.6.0+)
* ChocolateyPackageParametersSensitive - Package parameters passed from command line `--package-parameters-senstivite` that are not logged anywhere. (0.10.1+ and licensed editions 1.6.0+)
* ChocolateyPackageParametersSensitive - Package parameters passed from command line `--package-parameters-sensitive` that are not logged anywhere. (0.10.1+ and licensed editions 1.6.0+)
* ChocolateyLicensedVersion - What version is the licensed edition on?
* ChocolateyLicenseType - What edition / type of the licensed edition is installed?
Expand Down
12 changes: 6 additions & 6 deletions docker/Install-ChocolateyInContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ param (
if ($env:TEMP -eq $null) {
$env:TEMP = Join-Path $env:SystemDrive 'temp'
}
$chocTempDir = Join-Path $env:TEMP "chocolatey"
$tempDir = Join-Path $chocTempDir "chocInstall"
$chocoTempDir = Join-Path $env:TEMP "chocolatey"
$tempDir = Join-Path $chocoTempDir "chocoInstall"
if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)}
$file = Join-Path $tempDir "chocolatey.zip"
Copy-Item $chocolateyPackageFilePath $file -Force
Expand Down Expand Up @@ -72,13 +72,13 @@ param (
# Call chocolatey install
Write-Output "Installing chocolatey on this machine"
$toolsFolder = Join-Path $tempDir "tools"
$chocInstallPS1 = Join-Path $toolsFolder "chocolateyInstall.ps1"
$chocoInstallPS1 = Join-Path $toolsFolder "chocolateyInstall.ps1"

& $chocInstallPS1
& $chocoInstallPS1

Write-Output 'Ensuring chocolatey commands are on the path'
$chocInstallVariableName = "ChocolateyInstall"
$chocoPath = [Environment]::GetEnvironmentVariable($chocInstallVariableName)
$chocoInstallVariableName = "ChocolateyInstall"
$chocoPath = [Environment]::GetEnvironmentVariable($chocoInstallVariableName)
if ($chocoPath -eq $null -or $chocoPath -eq '') {
$chocoPath = 'C:\ProgramData\Chocolatey'
}
Expand Down
28 changes: 14 additions & 14 deletions nuspec/chocolatey/chocolatey/tools/chocolateysetup.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$thisScriptFolder = (Split-Path -parent $MyInvocation.MyCommand.Definition)
$chocInstallVariableName = "ChocolateyInstall"
$chocoInstallVariableName = "ChocolateyInstall"
$sysDrive = $env:SystemDrive
$tempDir = $env:TEMP
$defaultChocolateyPathOld = "$sysDrive\Chocolatey"
Expand Down Expand Up @@ -224,24 +224,24 @@ param(

$environmentTarget = [System.EnvironmentVariableTarget]::User
# removing old variable
Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue $null -variableType $environmentTarget
Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget
if (Test-ProcessAdminRights) {
Write-Debug "Administrator installing so using Machine environment variable target instead of User."
$environmentTarget = [System.EnvironmentVariableTarget]::Machine
# removing old variable
Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue $null -variableType $environmentTarget
Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue $null -variableType $environmentTarget
} else {
Write-ChocolateyWarning "Setting ChocolateyInstall Environment Variable on USER and not SYSTEM variables.`n This is due to either non-administrator install OR the process you are running is not being run as an Administrator."
}

Write-Output "Creating $chocInstallVariableName as an environment variable (targeting `'$environmentTarget`') `n Setting $chocInstallVariableName to `'$folder`'"
Write-Output "Creating $chocoInstallVariableName as an environment variable (targeting `'$environmentTarget`') `n Setting $chocoInstallVariableName to `'$folder`'"
Write-ChocolateyWarning "It's very likely you will need to close and reopen your shell `n before you can use choco."
Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue "$folder" -variableType $environmentTarget
Install-ChocolateyEnvironmentVariable -variableName "$chocoInstallVariableName" -variableValue "$folder" -variableType $environmentTarget
}

function Get-ChocolateyInstallFolder(){
Write-Debug "Get-ChocolateyInstallFolder"
[Environment]::GetEnvironmentVariable($chocInstallVariableName)
[Environment]::GetEnvironmentVariable($chocoInstallVariableName)
}

function Create-DirectoryIfNotExists($folderName){
Expand Down Expand Up @@ -473,13 +473,13 @@ param(
}

Write-Debug "Unpacking files required for Chocolatey."
$chocInstallFolder = Join-Path $thisScriptFolder "chocolateyInstall"
$chocoExe = Join-Path $chocInstallFolder 'choco.exe'
$chocoInstallFolder = Join-Path $thisScriptFolder "chocolateyInstall"
$chocoExe = Join-Path $chocoInstallFolder 'choco.exe'
$chocoExeDest = Join-Path $chocolateyPath 'choco.exe'
Copy-Item $chocoExe $chocoExeDest -force

Write-Debug "Copying the contents of `'$chocInstallFolder`' to `'$chocolateyPath`'."
Copy-Item $chocInstallFolder\* $chocolateyPath -Recurse -Force
Write-Debug "Copying the contents of `'$chocoInstallFolder`' to `'$chocolateyPath`'."
Copy-Item $chocoInstallFolder\* $chocolateyPath -Recurse -Force
}

function Ensure-ChocolateyLibFiles {
Expand All @@ -493,7 +493,7 @@ param(

if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) {
Write-Output "chocolatey.nupkg file not installed in lib.`n Attempting to locate it from bootstrapper."
$chocoZipFile = Join-Path $tempDir "chocolatey\chocInstall\chocolatey.zip"
$chocoZipFile = Join-Path $tempDir "chocolatey\chocoInstall\chocolatey.zip"

Write-Debug "First the zip file at '$chocoZipFile'."
Write-Debug "Then from a neighboring chocolatey.*nupkg file '$thisScriptFolder/../../'."
Expand Down Expand Up @@ -579,7 +579,7 @@ param(
function Initialize-ChocolateyPath {
param(
[string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin",
[string]$chocolateyExePathVariable = "%$($chocInstallVariableName)%\bin"
[string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin"
)
Write-Debug "Initialize-ChocolateyPath"
Write-Debug "Initializing Chocolatey Path if required"
Expand All @@ -597,7 +597,7 @@ param(
function Process-ChocolateyBinFiles {
param(
[string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin",
[string]$chocolateyExePathVariable = "%$($chocInstallVariableName)%\bin"
[string]$chocolateyExePathVariable = "%$($chocoInstallVariableName)%\bin"
)
Write-Debug "Process-ChocolateyBinFiles"
$processedMarkerFile = Join-Path $chocolateyExePath '_processed.txt'
Expand Down Expand Up @@ -801,7 +801,7 @@ function Invoke-Chocolatey-Initial {
& $chocoExe -v | Out-Null
Write-Debug "Chocolatey execution completed successfully."
} catch {
Write-ChocolateyWarning "Unable to run Chocolately at this time. It is likely that .Net Framework installation requires a system reboot"
Write-ChocolateyWarning "Unable to run Chocolatey at this time. It is likely that .Net Framework installation requires a system reboot"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $nugetExePath = Join-Path $nuGetPath 'bin'
$nugetLibPath = Join-Path $nuGetPath 'lib'
$badLibPath = Join-Path $nuGetPath 'lib-bad'
$extensionsPath = Join-Path $nugetPath 'extensions'
$chocInstallVariableName = "ChocolateyInstall"
$chocoInstallVariableName = "ChocolateyInstall"
$chocoTools = Join-Path $nuGetPath 'tools'
$nugetExe = Join-Path $chocoTools 'nuget.exe'
$7zip = Join-Path $chocoTools '7z.exe'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
function Get-ChocolateyWebFile {
<#
.SYNOPSIS
Downloads a file from the internets.
Downloads a file from the internet.
.DESCRIPTION
This will download a file from a url, tracking with a progress bar.
Expand Down
2 changes: 1 addition & 1 deletion src/chocolatey.resources/helpers/functions/Get-FtpFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
function Get-FtpFile {
<#
.SYNOPSIS
Downloads a file from a File Transfter Protocol (FTP) location.
Downloads a file from a File Transfer Protocol (FTP) location.
.DESCRIPTION
This will download a file from an FTP location, saving the file to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ None
.PARAMETER Compare
This optional parameter causes the function to return $true or $false,
depending on wether or not the bit width matches.
depending on whether or not the bit width matches.
#>
param(
$compare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The name or key of the environment variable
A string value assigned to the above name.
.PARAMETER VariableType
Specifies whether this variable is to be accesible at either the
Specifies whether this variable is to be accessible at either the
individual user level or at the Machine level.
.PARAMETER IgnoredArguments
Expand All @@ -64,7 +64,7 @@ Install-ChocolateyEnvironmentVariable "JAVA_HOME" "d:\oracle\jdk\bin"
>
# Creates a User environment variable "_NT_SYMBOL_PATH" pointing to
# "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols".
# The command will be elevated to admin priviledges.
# The command will be elevated to admin privileges.
Install-ChocolateyEnvironmentVariable `
-VariableName "_NT_SYMBOL_PATH" `
-VariableValue "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols" `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Pro / Business supports a single, ubiquitous install directory option.
if ($fileType -like 'msi') {
$msiArgs = "/i `"$fileFullPath`""
$msiArgs = if ($overrideArguments) {
Write-Host "Overriding package arguments with '$additonalInstallArgs' (replacing '$silentArgs')"
Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')"
"$msiArgs $additionalInstallArgs"
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Allows splatting with arguments that do not apply. Do not use directly.
Specifies the commands to run after download has completed but before install steps have begun.
Available in 0.11.0+.
Use this for starting an auxilary process such as AutoHotkey, so that any timeouts are not
Use this for starting an auxiliary process such as AutoHotkey, so that any timeouts are not
affected by the time to download.
.EXAMPLE
Expand Down Expand Up @@ -305,7 +305,7 @@ Install-ChocolateyPackage 'StExBar' 'msi' '/quiet' `
.EXAMPLE
>
Install-ChocolateyPackage 'mono' 'exe' '/SILENT' `
'http://somehwere/something.exe' -ValidExitCodes @(0,21)
'http://somewhere/something.exe' -ValidExitCodes @(0,21)
.EXAMPLE
>
Expand Down Expand Up @@ -371,8 +371,8 @@ param(

Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters

$chocTempDir = $env:TEMP
$tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
$chocoTempDir = $env:TEMP
$tempDir = Join-Path $chocoTempDir "$($env:chocolateyPackageName)"
if ($env:chocolateyPackageVersion -ne $null) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }
$tempDir = $tempDir -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ In 0.10.4+, `Url` is an alias for VsixUrl.
The major version number of Visual Studio where the
package should be installed. This is optional. If not
specified, the most recent Visual Studio installation
will be targetted.
will be targeted.
NOTE: For Visual Studio 2015, the VsVersion is 14. It can be determined
by looking at the folders under Program Files / Program Files (x86).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ param(

$fileType = 'zip'

$chocTempDir = $env:TEMP
$tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
$chocoTempDir = $env:TEMP
$tempDir = Join-Path $chocoTempDir "$($env:chocolateyPackageName)"
if ($env:chocolateyPackageVersion -ne $null) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }
$tempDir = $tempDir -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This will uninstall a zip file if installed via Install-ChocolateyZipPackage.
This is not necessary if the files are unzipped to the package directory.
.NOTES
Not necessary if files are unzippped to package directory.
Not necessary if files are unzipped to package directory.
This helper reduces the number of lines one would have to remove the
files extracted from a previously installed zip file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ to reverse the installation done in the install script.
With auto uninstaller turned off, a chocolateyUninstall.ps1 is required
to perform uninstall from "Programs and Features". In the absence of
chocolateyUninstall.ps1, choco uninstall only removes the package from
Chocolatey but does not remove the sofware from your system without
Chocolatey but does not remove the software from your system without
auto uninstaller.
.NOTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function Update-SessionEnvironment {
<#
.SYNOPSIS
Updates the environment variables of the current powershell session with
any environment variable changes that may have occured during a
any environment variable changes that may have occurred during a
Chocolatey package install.
.DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<ItemGroup>
<Compile Include="infrastructure.app\services\FilesServiceSpecs.cs" />
<Compile Include="infrastructure\commands\CommandExecutorSpecs.cs" />
<Compile Include="infrastructure\cryptography\CrytpoHashProviderSpecs.cs" />
<Compile Include="infrastructure\cryptography\CryptoHashProviderSpecs.cs" />
<Compile Include="infrastructure\filesystem\DotNetFileSystemSpecs.cs" />
<Compile Include="MockEventSubscriptionManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ namespace chocolatey.tests.integration.infrastructure.cryptography
using chocolatey.infrastructure.filesystem;
using Should;

public class CrytpoHashProviderSpecs
public class CryptoHashProviderSpecs
{
public abstract class CrytpoHashProviderSpecsBase : TinySpec
public abstract class CryptoHashProviderSpecsBase : TinySpec
{
protected CryptoHashProvider Provider;
protected DotNetFileSystem FileSystem;
Expand All @@ -39,7 +39,7 @@ public override void Context()
}
}

public class when_HashProvider_provides_a_hash : CrytpoHashProviderSpecsBase
public class when_HashProvider_provides_a_hash : CryptoHashProviderSpecsBase
{
private string result;
private string filePath;
Expand Down
12 changes: 6 additions & 6 deletions src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public override void Context()
{
base.Context();
Configuration.Noop = true;
Configuration.PackageNames = Configuration.Input = "nonexistingpackage";
Configuration.PackageNames = Configuration.Input = "nonexistentpackage";
}

public override void Because()
Expand All @@ -178,7 +178,7 @@ public void should_contain_a_message_the_package_was_not_found()
bool expectedMessage = false;
foreach (var message in MockLogger.MessagesFor(LogLevel.Error).or_empty_list_if_null())
{
if (message.Contains("nonexistingpackage not installed. The package was not found with the source(s) listed")) expectedMessage = true;
if (message.Contains("nonexistentpackage not installed. The package was not found with the source(s) listed")) expectedMessage = true;
}

expectedMessage.ShouldBeTrue();
Expand Down Expand Up @@ -728,7 +728,7 @@ public void should_have_executed_chocolateyInstall_script_for_new_package()
}
}

public class when_upgrading_an_existing_prerelease_package_with_prerelease_available_with_excludeprelease_and_without_prerelease_specified : ScenariosBase
public class when_upgrading_an_existing_prerelease_package_with_prerelease_available_with_excludeprerelease_and_without_prerelease_specified : ScenariosBase
{
private PackageResult _packageResult;

Expand Down Expand Up @@ -820,7 +820,7 @@ public void should_only_find_the_last_stable_version()
}
}

public class when_upgrading_an_existing_prerelease_package_with_allow_downgrade_with_excludeprelease_and_without_prerelease_specified : ScenariosBase
public class when_upgrading_an_existing_prerelease_package_with_allow_downgrade_with_excludeprerelease_and_without_prerelease_specified : ScenariosBase
{
private PackageResult _packageResult;

Expand Down Expand Up @@ -1696,7 +1696,7 @@ public class when_upgrading_a_package_that_does_not_exist : ScenariosBase
public override void Context()
{
base.Context();
Configuration.PackageNames = Configuration.Input = "nonexistingpackage";
Configuration.PackageNames = Configuration.Input = "nonexistentpackage";
}

public override void Because()
Expand All @@ -1719,7 +1719,7 @@ public void should_contain_a_message_the_package_was_not_found()
bool expectedMessage = false;
foreach (var message in MockLogger.MessagesFor(LogLevel.Error).or_empty_list_if_null())
{
if (message.Contains("nonexistingpackage not installed. The package was not found with the source(s) listed")) expectedMessage = true;
if (message.Contains("nonexistentpackage not installed. The package was not found with the source(s) listed")) expectedMessage = true;
}

expectedMessage.ShouldBeTrue();
Expand Down
Loading

0 comments on commit 6f3fc15

Please sign in to comment.