From f973035753b3e3684cdba60814ff00e03bf985b3 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Fri, 30 Jun 2023 09:41:12 +0100 Subject: [PATCH] (doc) Apply scripting best practices to output When using the full name of an option, the recommendation is always to use -- and not a single -. This commit updates the output from the validation results to adhere to this best practice. --- .../validations/GlobalConfigurationValidation.cs | 2 +- .../infrastructure.app/validations/SystemStateValidation.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs b/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs index 6c7f8aa495..beadb4e02f 100644 --- a/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs +++ b/src/chocolatey/infrastructure.app/validations/GlobalConfigurationValidation.cs @@ -64,7 +64,7 @@ private void ValidateUseOfPackageExitCode(ChocolateyConfiguration config, IColle Message = @"When attempting to halt execution of a Chocolatey command based on a request for a system reboot, it is necessary to have the usePackageExitCodes feature enabled. Use the following command: - choco feature enable -name={0} + choco feature enable --name=""{0}"" to enable this feature (exit code 1). ".FormatWith(ApplicationParameters.Features.UsePackageExitCodes), Status = ValidationStatus.Error, diff --git a/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs b/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs index f8c3ff19f0..89bc90acfe 100644 --- a/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs +++ b/src/chocolatey/infrastructure.app/validations/SystemStateValidation.cs @@ -84,7 +84,7 @@ It is recommended that you reboot at your earliest convenience. being ignored due to the current Chocolatey configuration. If you want to halt when this occurs, then either set the global feature using: - choco feature enable -name={0} + choco feature enable --name=""{0}"" or pass the option --exit-when-reboot-detected. ".FormatWith(ApplicationParameters.Features.ExitOnRebootDetected), Status = ValidationStatus.Warning,