Invoke-Expression: Error
Advik-B opened this issue · comments
Description
Installation Logs
VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: received 25096-byte response of content type text/plain
VERBOSE: Content encoding: utf-8
VERBOSE: -------- PSBoundParameters --------
VERBOSE: [RunAsAdmin, True]
VERBOSE: -------- Environment Variables --------
VERBOSE: $env:USERPROFILE: C:\Users\Advik
VERBOSE: $env:ProgramData: C:\ProgramData
VERBOSE: $env:SCOOP:
VERBOSE: $env:SCOOP_CACHE:
VERBOSE: $env:SCOOP_GLOBAL:
VERBOSE: -------- Selected Variables --------
VERBOSE: SCOOP_DIR: C:\Users\Advik\scoop
VERBOSE: SCOOP_CACHE_DIR: C:\Users\Advik\scoop\cache
VERBOSE: SCOOP_GLOBAL_DIR: C:\ProgramData\scoop
VERBOSE: SCOOP_CONFIG_HOME: C:\Users\Advik\.config
Initializing...
Downloading ...
VERBOSE: Cloning https://github.com/ScoopInstaller/Scoop.git to C:\Users\Advik\scoop\apps\scoop\current
fatal: destination path 'C:\Users\Advik\scoop\apps\scoop\current' already exists and is not an empty directory.
VERBOSE: Cloning https://github.com/ScoopInstaller/Main.git to C:\Users\Advik\scoop\buckets\main
fatal: destination path 'C:\Users\Advik\scoop\buckets\main' already exists and is not an empty directory.
Creating shim...
Adding ~\scoop\shims to your path.
Invoke-Expression: Exception calling "SetValue" with "3" argument(s): "The type of the value object did not match the specified RegistryValueKind or the object could not be properly converted."
PowerShell Context
PowerShell 7.3.4
Additional Information
OS: Windows
AntiVirus: Kaspersky
Possible Solution
Have you tried to delete both directories before calling the installer? Obviously something failed and the directories exist although scoop is not available in the command line.
I did, but it still did not work
Mmmh, weird. The installer does not create ~\scoop\apps\scoop nor ~\scoop\buckets\main before cloning.
You could try to delete the whole scoop dir: ~\scoop .
Otherwise #57 should fix this issue, too.
I did try to delete the whole scoop dirctory but it still did not work
https://github.com/ScoopInstaller/Install#advanced-installation
Download install.ps1
, print $RegistryValueKind
.
Line 427 in 9b0e949
https://github.com/ScoopInstaller/Install#advanced-installation
Download
install.ps1
, print$RegistryValueKind
.Line 427 in 9b0e949
ExpandString
It suddenly worked now?
I think the programming gods smiled upon us
https://github.com/ScoopInstaller/Install#advanced-installation
Downloadinstall.ps1
, print$RegistryValueKind
.
Line 427 in 9b0e949
ExpandString
It looks like the Scoop execution directory already exists in your environment variables.
It seems that as long as the type is inconsistent during installation, an error will be reported. This is indeed a problem, the exception should be handled, if it is determined that it is caused by type inconsistency.
For some reason, it randomly worked now?