choco icon indicating copy to clipboard operation
choco copied to clipboard

Clarify or amend default selection for the "are you sure you want to continue" prompt on non-elevated execution

Open abbychau opened this issue 1 year ago • 1 comments

Checklist

  • [x] I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • [x] I have verified this is the correct repository for opening this issue.
  • [x] I have verified no other issues exist related to my problem.
  • [x] I have verified this is not an issue for a specific package.
  • [x] I have verified this issue is not security related.
  • [x] I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

Image

as shown i didn't answer Y but it continued.

What is Expected?

It should not continue without answering Y

How Did You Get This To Happen?

choco install llvm

enter

System Details

  • Operating System: Win 11
  • Windows PowerShell version: 5 1 22621 4391
  • Chocolatey CLI Version: 2.2.2
  • Chocolatey Licensed Extension version: /
  • Chocolatey License type: /
  • Terminal/Emulator: Windows PowerShell

Installed Packages

Chocolatey v2.2.2
chocolatey 2.2.2
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-visualstudio.extension 1.11.0
chocolatey-windowsupdate.extension 1.0.5
dotnetfx 4.8.0.20220524
golangci-lint 1.59.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
llvm 19.1.5
python 3.12.3
python3 3.12.3
python311 3.11.9
vcredist140 14.36.32532
vcredist2015 14.0.24215.20170201
visualstudio2019buildtools 16.11.28
visualstudio2019-workload-vctools 1.0.1
visualstudio-installer 2.0.3
22 packages installed.

Output Log

2024-07-07 03:56:39,585 15432 [WARN ] - 
Chocolatey has determined 7 package(s) are outdated. 
2024-07-07 03:56:39,587 15432 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2024-07-07 03:56:39,588 15432 [DEBUG] - Exiting with 0
2025-01-11 03:36:43,903 44380 [DEBUG] - XmlConfiguration is now operational
2025-01-11 03:36:43,933 44380 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,933 44380 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,933 44380 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'RubyGemsService' for type 'IListSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,934 44380 [DEBUG] - Adding new type 'RubyGemsService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-01-11 03:36:43,935 44380 [DEBUG] - Adding new type 'SystemStateValidation' for type 'IValidation' from assembly 'choco'
2025-01-11 03:36:43,935 44380 [DEBUG] - Adding new type 'CacheFolderLockdownValidation' for type 'IValidation' from assembly 'choco'
2025-01-11 03:36:44,092 44380 [DEBUG] - Adding new type 'EmptyOrInvalidUrlMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,092 44380 [DEBUG] - Adding new type 'FrameWorkReferencesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,092 44380 [DEBUG] - Adding new type 'IconMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,093 44380 [DEBUG] - Adding new type 'LicenseMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,093 44380 [DEBUG] - Adding new type 'PackageTypesMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,093 44380 [DEBUG] - Adding new type 'ReadmeMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,093 44380 [DEBUG] - Adding new type 'RepositoryMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,093 44380 [DEBUG] - Adding new type 'RequireLicenseAcceptanceMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,094 44380 [DEBUG] - Adding new type 'ServicableMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,094 44380 [DEBUG] - Adding new type 'VersionMetadataRule' for type 'IMetadataRule' from assembly 'choco'
2025-01-11 03:36:44,098 44380 [DEBUG] - Registering new command 'cache' in assembly 'choco'
2025-01-11 03:36:44,098 44380 [DEBUG] - Registering new command 'list' in assembly 'choco'
2025-01-11 03:36:44,098 44380 [DEBUG] - Registering new command 'template' in assembly 'choco'
2025-01-11 03:36:44,099 44380 [DEBUG] - Registering new command 'export' in assembly 'choco'
2025-01-11 03:36:44,099 44380 [DEBUG] - Registering new command 'info' in assembly 'choco'
2025-01-11 03:36:44,099 44380 [DEBUG] - Registering new command 'help' in assembly 'choco'
2025-01-11 03:36:44,099 44380 [DEBUG] - Registering new command 'config' in assembly 'choco'
2025-01-11 03:36:44,099 44380 [DEBUG] - Registering new command 'feature' in assembly 'choco'
2025-01-11 03:36:44,100 44380 [DEBUG] - Registering new command 'new' in assembly 'choco'
2025-01-11 03:36:44,100 44380 [DEBUG] - Registering new command 'outdated' in assembly 'choco'
2025-01-11 03:36:44,100 44380 [DEBUG] - Registering new command 'pack' in assembly 'choco'
2025-01-11 03:36:44,100 44380 [DEBUG] - Registering new command 'pin' in assembly 'choco'
2025-01-11 03:36:44,100 44380 [DEBUG] - Registering new command 'push' in assembly 'choco'
2025-01-11 03:36:44,101 44380 [DEBUG] - Registering new command 'apikey' in assembly 'choco'
2025-01-11 03:36:44,101 44380 [DEBUG] - Registering new command 'source' in assembly 'choco'
2025-01-11 03:36:44,101 44380 [DEBUG] - Registering new command 'uninstall' in assembly 'choco'
2025-01-11 03:36:44,101 44380 [DEBUG] - Registering new command 'upgrade' in assembly 'choco'
2025-01-11 03:36:44,101 44380 [DEBUG] - Registering new command 'search' in assembly 'choco'
2025-01-11 03:36:44,102 44380 [DEBUG] - Registering new command 'unpackself' in assembly 'choco'
2025-01-11 03:36:44,102 44380 [DEBUG] - Registering new command 'install' in assembly 'choco'
2025-01-11 03:36:44,154 44380 [INFO ] - ============================================================
2025-01-11 03:36:44,204 44380 [DEBUG] - Attempting to create directory "C:\Users\abbym\AppData\Local\Temp\chocolatey".
2025-01-11 03:36:44,215 44380 [DEBUG] - User may be subject to UAC, checking for a split token (not 100%
 effective).
2025-01-11 03:36:44,228 44380 [INFO ] - Chocolatey v2.2.2
2025-01-11 03:36:44,231 44380 [DEBUG] - Chocolatey is running on Windows v 10.0.22631.0
2025-01-11 03:36:44,232 44380 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2025-01-11 03:36:44,232 44380 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2025-01-11 03:36:44,237 44380 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install llvm
2025-01-11 03:36:44,238 44380 [DEBUG] - Received arguments: install llvm
2025-01-11 03:36:44,261 44380 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2025-01-11 03:36:44,265 44380 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2025-01-11 03:36:44,269 44380 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2025-01-11 03:36:44,291 44380 [DEBUG] - Performing validation checks.
2025-01-11 03:36:44,293 44380 [DEBUG] - Global Configuration Validation Checks:
2025-01-11 03:36:44,294 44380 [DEBUG] -  - Package Exit Code / Exit On Reboot = Checked
2025-01-11 03:36:44,295 44380 [DEBUG] - System State Validation Checks:
2025-01-11 03:36:44,295 44380 [DEBUG] -  Reboot Requirement Checks:
2025-01-11 03:36:44,296 44380 [DEBUG] -  - Pending Computer Rename = Checked
2025-01-11 03:36:44,297 44380 [DEBUG] -  - Pending Component Based Servicing = Checked
2025-01-11 03:36:44,298 44380 [DEBUG] -  - Pending Windows Auto Update = Checked
2025-01-11 03:36:44,298 44380 [DEBUG] -  - Pending File Rename Operations = Ignored
2025-01-11 03:36:44,299 44380 [DEBUG] -  - Pending Windows Package Installer = Checked
2025-01-11 03:36:44,299 44380 [DEBUG] -  - Pending Windows Package Installer SysWow64 = Checked
2025-01-11 03:36:44,300 44380 [DEBUG] - Cache Folder Lockdown Checks:
2025-01-11 03:36:44,300 44380 [DEBUG] -  - Elevated State = Failed
2025-01-11 03:36:44,302 44380 [INFO ] - 3 validations performed. 3 success(es), 0 warning(s), and 0 error(s).
2025-01-11 03:36:44,302 44380 [WARN ] - Chocolatey detected you are not running from an elevated command shell
 (cmd/powershell).
2025-01-11 03:36:44,304 44380 [WARN ] - 
 You may experience errors - many functions/packages
 require admin rights. Only advanced users should run choco w/out an
 elevated shell. When you open the command shell, you should ensure
 that you do so with "Run as Administrator" selected. If you are
 attempting to use Chocolatey in a non-administrator setting, you
 must select a different location other than the default install
 location. See
 https://docs.chocolatey.org/en-us/choco/setup#non-administrative-install
 for details.

2025-01-11 03:36:44,313 44380 [INFO ] - 
 Do you want to continue?
2025-01-11 03:36:44,313 44380 [INFO ] -  1) yes
2025-01-11 03:36:44,313 44380 [INFO ] -  2) no
2025-01-11 03:36:45,629 44380 [ERROR] - Timeout or your choice of '' is not a valid selection.
2025-01-11 03:36:45,634 44380 [DEBUG] - The source 'https://community.chocolatey.org/api/v2/' evaluated to a 'normal' source type
2025-01-11 03:36:45,635 44380 [DEBUG] - 
NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
2025-01-11 03:36:45,638 44380 [DEBUG] - Configuration: CommandName='install'|
CacheLocation='C:\Users\abbym\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://community.chocolatey.org/api/v2/'|SourceType='normal'|
ShowOnlineHelp='False'|Debug='False'|Verbose='False'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='True'|DisableCompatibilityChecks='False'|
AcceptLicense='False'|AllowUnofficialBuild='False'|Input='llvm'|
AllVersions='False'|SkipPackageInstallProvider='False'|
SkipHookScripts='False'|PackageNames='llvm'|Prerelease='False'|
ForceX86='False'|OverrideArguments='False'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.22631.0'|
Information.PlatformName='Windows 10'|
Information.ChocolateyVersion='2.2.2.0'|
Information.ChocolateyProductVersion='2.2.2'|
Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='abbym'|Information.UserDomainName='ABBY'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='False'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='C:\Users\abbym\sonic'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
2025-01-11 03:36:45,639 44380 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2025-01-11 03:36:45,643 44380 [INFO ] - Installing the following packages:
2025-01-11 03:36:45,643 44380 [INFO ] - llvm
2025-01-11 03:36:45,644 44380 [INFO ] - By installing, you accept licenses for the packages.
2025-01-11 03:36:45,737 44380 [DEBUG] - Running list with the following filter = ''
2025-01-11 03:36:45,737 44380 [DEBUG] - --- Start of List ---
2025-01-11 03:36:45,746 44380 [DEBUG] - Resolving resource PackageSearchResource for source C:\ProgramData\chocolatey\lib
2025-01-11 03:36:45,848 44380 [DEBUG] - chocolatey 2.2.2
2025-01-11 03:36:45,851 44380 [DEBUG] - chocolatey-compatibility.extension 1.0.0
2025-01-11 03:36:45,852 44380 [DEBUG] - chocolatey-core.extension 1.4.0
2025-01-11 03:36:45,853 44380 [DEBUG] - chocolatey-dotnetfx.extension 1.0.1
2025-01-11 03:36:45,855 44380 [DEBUG] - chocolatey-visualstudio.extension 1.11.0
2025-01-11 03:36:45,856 44380 [DEBUG] - chocolatey-windowsupdate.extension 1.0.5
2025-01-11 03:36:45,858 44380 [DEBUG] - dotnetfx 4.8.0.20220524
2025-01-11 03:36:45,860 44380 [DEBUG] - golangci-lint 1.59.0
2025-01-11 03:36:45,861 44380 [DEBUG] - KB2919355 1.0.20160915

Additional Context

No response

abbychau avatar Jan 10 '25 18:01 abbychau

I don't think it's necessarily that your choice was ignored, it seems more that it didn't communicate that it's default action would be to continue.

I believe we may be able to add additional logic around this prompt and have the default be continue when -y is passed or allowGlobalConfirmation is enabled, and halt otherwise. But I am not certain on that. It may be better served making the prompt clearer that anything but n (and maybe no?) will result in continuing execution.

In any case, I don't think this is a bug, so I'll switch the label to Improvement.

corbob avatar Jan 18 '25 23:01 corbob