scoopinstaller / install Goto Github PK
View Code? Open in Web Editor NEW📥 Next-generation Scoop (un)installer
Home Page: https://get.scoop.sh
License: The Unlicense
📥 Next-generation Scoop (un)installer
Home Page: https://get.scoop.sh
License: The Unlicense
Some people (read, me) use a scoop installation in a git working copy - e.g., to be able to cache it in GitLab CI, which can only cache files relative to the git repository and not outside of it. However, git
operations should probably not consider this directory.
Create a .gitignore
file containing only *
, compare python/cpython#108125
@r15ch13 Just transfered the repo to scoopinstaller
.
Hello,
I just uninstalled Scoop to move it to another location, but the variable $scoopdir seems to persist.
How do I go about changing this? Right now it points to a dir that doesn't exist anymore.
Can I just change $scoopdir to whatever it needs to be?
Here is the full output:
PS C:\Windows\System32> E:\Downloads\install.ps1 -ScoopDir "E:\Programs\" -ScoopGlobalDir "E:\Programs"
Initializing...
Downloading...
Extracting...
Creating shim...
Scoop was installed successfully!
Type 'scoop help' for instructions.
PS C:\Windows\System32> scoop
Get-ChildItem: E:\Programs\apps\scoop\current\lib\commands.ps1:3
Line |
3 | + (Get-ChildItem "$scoopdir\shims") `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\Programs\Scoop\shims' because it does not exist.
Get-ChildItem: E:\Programs\apps\scoop\current\lib\commands.ps1:3
Line |
3 | + (Get-ChildItem "$scoopdir\shims") `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\Programs\Scoop\shims' because it does not exist.
Usage: scoop <command> [<args>]
Some useful commands are:
Get-ChildItem: E:\Programs\apps\scoop\current\lib\commands.ps1:3
Line |
3 | + (Get-ChildItem "$scoopdir\shims") `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find path 'D:\Programs\Scoop\shims' because it does not exist.
alias Manage scoop aliases
bucket Manage Scoop buckets
cache Show or clear the download cache
checkup Check for potential problems
cleanup Cleanup apps by removing old versions
config Get or set configuration values
create Create a custom app manifest
depends List dependencies for an app
export Exports (an importable) list of installed apps
help Show help for a command
hold Hold an app to disable updates
home Opens the app homepage
info Display information about an app
install Install apps
list List installed apps
prefix Returns the path to the specified app
reset Reset an app to resolve conflicts
search Search available apps
status Show status and check for new app versions
unhold Unhold an app to enable updates
uninstall Uninstall an app
update Update apps, or Scoop itself
virustotal Look for app's hash on virustotal.com
which Locate a shim/executable (similar to 'which' on Linux)
Type 'scoop help <command>' to get help for a specific command.
Some users are unable to realize that they are running a broken OS.
Check $env:PATH
, if not as expected: aborts the installation and show related information.
%SystemRoot%\system32
for cmd.exe
, msiexec.exe
, robocopy.exe
, etc.ScoopInstaller/Scoop#3238
ScoopInstaller/Scoop#5364
ScoopInstaller/Scoop#5518
ScoopInstaller/Scoop#5429
ScoopInstaller/Scoop#4876
ScoopInstaller/Scoop#4875
ScoopInstaller/Scoop#376
Description:
I love Scoop and want to support "offline" usage in my company. Therefore I tackled an already existing TODO:
Line 680 in 656e17b
In an environment where all the configuration is version controlled, I'd rather set up the path myself in other ways. I'd rather not have to worry about some external program messing around with the PATH. So I'm interested in an option to the installer allowing that.
Add a flag to the installer -UpdateOsPath which defaults to true (current behavior) and allow someone to pass false if they'd rather set up the PATH in some other way.
Install script fails due to color arguments in the script.
Error message:
{
"changed": true,
"debug": [],
"error": [
{
"category_info": {
"activity": "Write-InstallInfo",
"category": "InvalidData",
"category_id": 6,
"reason": "ParentContainsErrorRecordException",
"target_name": "",
"target_type": ""
},
"error_details": null,
"exception": {
"help_link": null,
"hresult": -2146233087,
"inner_exception": null,
"message": "Cannot process argument transformation on parameter 'ForegroundColor'. Cannot convert null to type \"System.ConsoleColor\" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. The possible enumeration values are \"Black,DarkBlue,DarkGreen,DarkCyan,DarkRed,DarkMagenta,DarkYellow,Gray,DarkGray,Blue,Green,Cyan,Red,Magenta,Yellow,White\".",
"source": null,
"type": "System.Management.Automation.ParentContainsErrorRecordException"
},
"fully_qualified_error_id": "ParameterArgumentTransformationError,Write-InstallInfo",
"output": "Write-InstallInfo : Cannot process argument transformation on parameter 'ForegroundColor'. Cannot convert null to type \r\n\"System.ConsoleColor\" due to enumeration values that are not valid. Specify one of the following enumeration values and \r\ntry again. The possible enumeration values are \"Black,DarkBlue,DarkGreen,DarkCyan,DarkRed,DarkMagenta,DarkYellow,Gray,Da\r\nrkGray,Blue,Green,Cyan,Red,Magenta,Yellow,White\".\r\nAt C:\\downloads\\scoop\\install.ps1:555 char:5\r\n+ Write-InstallInfo (\"Initializing...\")\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidData: (:) [Write-InstallInfo], ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : ParameterArgumentTransformationError,Write-InstallInfo\r\n \r\n",
"pipeline_iteration_info": [],
"script_stack_trace": "at Install-Scoop, C:\\downloads\\scoop\\install.ps1: line 555\r\nat <ScriptBlock>, C:\\downloads\\scoop\\install.ps1: line 694\r\nat <ScriptBlock>, <No file>: line 2",
"target_object": null
}
],
"host_err": "",
"host_out": "",
"information": [],
"output": [],
"result": {},
"verbose": [],
"warning": []
}
Not to throw this exception.
I worked around this by removing the terminal color code in the Write-InstallInfo function of the install script.
Windows version: Server 2022
OS architecture: 64bit
PowerShell version: 5.1
Operation did not complete successfully because the file contains a virus or potentially unwanted software. : 'C:\Users\Rishab\scoop\apps\scoop\current_tmp\Scoop-master\lib\autoupdate.ps1'
And copy and paste the installation logs here with markdown code block syntax:
Extracting...
Copy-Item:
Line |
623 | Copy-Item "$scoopUnzipTempDir\scoop-*\*" $SCOOP_APP_DIR -Recu …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Operation did not complete successfully because the file contains a virus or potentially unwanted software. : 'C:\Users\Rishab\scoop\apps\scoop\current\_tmp\Scoop-master\lib\autoupdate.ps1'
Name Value
---- -----
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
scoop install git
Installing '7zip' (23.01) [64bit] from main bucket
7z2301-x64.msi (1.8 MB) [=========================================================================================================================================================================================================] 100%
Checking hash of 7z2301-x64.msi ... ok.
Extracting 7z2301-x64.msi ... ERROR Exit code was 1626!
git: C:\<redacted>\scoop\apps\scoop\current\lib\buckets.ps1:172
Line |
172 | $remote = git -C "$bucket_path" config --get remote.origin.ur .
| ~~~
| The term 'git' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was inc
luded, verify that the path is correct and try again.
Failed to extract files from C:\<redacted>\scoop\apps\7zip\23.01\7z2301-x64.msi.
Log file:
~\scoop\apps\7zip\23.01\msi.log
Please try again or create a new issue by using the following link and paste your console output:
https:////
git -Service
git: The term 'git' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
(I've removed my user path for privacy reasons)
cat ~\scoop\apps\7zip\23.01\msi.log
1: 0 2: 1033 3: 0
=== Logging started: 8/18/2023 2:33:48 ===
Message type: 0, Argument: 1033, 0
Message type: 1, Argument: 7-Zip 23.01 (x64 edition)
Action 2:33:48: ADMIN.
Action start 2:33:48: ADMIN.
Action ended 2:33:48: ADMIN. Return value 0
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0.}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Currently the installer (at least the ps1 script for windows) tries to install scoop by cloning the repo only via HTTPS:
# ...
$SCOOP_PACKAGE_GIT_REPO = "https://github.com/ScoopInstaller/Scoop.git"
# ...
git clone -q $SCOOP_PACKAGE_GIT_REPO $SCOOP_APP_DIR
If the HTTPS transport protocol is disabled in the git configuration of a user/system, the installer breaks.
The installer should try to fallback to SSH.
This is my installer output:
PS> irm get.scoop.sh | iex
Initializing...
Downloading ...
fatal: transport 'https' not allowed
fatal: transport 'https' not allowed
Creating shim...
Resolve-Path : Cannot find path 'C:\Users\u6\scoop\apps\scoop\current\bin\scoop.ps1' because it does not exist.
At line:309 char:21
+ $relativePath = Resolve-Path -Relative $path
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\u6\scoop\a…rrent\bin\scoop.ps1:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
Resolve-Path : Cannot find path 'C:\Users\u6\scoop\apps\scoop\current\bin\scoop.ps1' because it does not exist.
At line:311 char:21
+ $absolutePath = Resolve-Path $path
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\u6\scoop\a…rrent\bin\scoop.ps1:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.
Running git config --get-regexp "protocol\..*"
on a system could return something like this:
protocol.http.allow never
protocol.https.allow never
protocol.git.allow never
protocol.file.allow never
protocol.ssh.allow always
... or git config --get protocol.https.allow
:
never
... means that HTTPS cannot be used to clone repos.
The actual capability of cloning via HTTPS could be also determined by the git config value protocol.allow
, if set, or the env variable GIT_PROTOCOL_FROM_USER
if the value is user
.
See here: https://git-scm.com/docs/git-config#Documentation/git-config.txt-protocolallow
Instead of trying to parse the git configuration, which could be cumbersome, a check like !$? -or $LASTEXITCODE -eq 128
right after the git clone
command should be sufficient.
In case of error you can then proceed with cloning via SSH ([email protected]:ScoopInstaller/Scoop.git
).
Windows version: 11 (Microsoft Windows [Version 10.0.22621.1702]
)
OS architecture: x64
PowerShell version: 7.3.4
Additional software: git version 2.40.1.windows.1
, OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
{
"last_update": "2023-05-30T15:49:12.9478507+02:00"
}
.\install_scoop.ps1 -ScoopDir 'C:\Applications\Scoop' -ScoopGlobalDir 'C:\Applications\GlobalScoopApps'
Initializing...
Downloading...
Extracting...
Creating shim...
Scoop was installed successfully!
Type 'scoop help' for instructions.
scoop help
Get-ChildItem : Der Pfad "C:\Program Files\shims" kann nicht gefunden werden, da er nicht vorhanden ist.
In C:\Applications\Scoop\apps\scoop\current\lib\commands.ps1:2 Zeichen:51
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage: scoop []
Available commands are listed below.
Type 'scoop help ' to get more help for a specific command.
Get-ChildItem : Der Pfad "C:\Program Files\shims" kann nicht gefunden werden, da er nicht vorhanden ist.
In C:\Applications\Scoop\apps\scoop\current\lib\commands.ps1:2 Zeichen:51
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Command Summary
alias Manage scoop aliases
bucket Manage Scoop buckets
....
scoop update
Scoop uses Git to update itself. Run 'scoop install git' and try again.
scoop install git
Get-ChildItem : Der Pfad "C:\Program Files\buckets" kann nicht gefunden werden, da er nicht vorhanden ist.
In C:\Applications\Scoop\apps\scoop\current\lib\buckets.ps1:61 Zeichen:21
$bucketNames = (Get-ChildItem -Path $bucketsdir -Directory).Name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get-ChildItem : Der Pfad "C:\Program Files\buckets" kann nicht gefunden werden, da er nicht vorhanden ist.
In C:\Applications\Scoop\apps\scoop\current\lib\buckets.ps1:61 Zeichen:21
$bucketNames = (Get-ChildItem -Path $bucketsdir -Directory).Name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Couldn't find manifest for 'git'.
scoop bucket add main
ERROR Git is required for buckets. Run 'scoop install git' and try again.
scoop bucket add extras
ERROR Git is required for buckets. Run 'scoop install git' and try again.
Name Value
PSVersion 5.1.19041.4291
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4291
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I use the command to install scoop
.\install.ps1 -RunAsAdmin -ScoopDir 'D:\Scoop' -ScoopGlobalDir 'D:\GlobalScoopApps' -NoProxy
but the ScoopApps was still installed in D:\Scoop\ ,not in D:\GlobalScoopApps
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 7.3.4
OS: Windows
AntiVirus: Kaspersky
Hi @WHYBBE & @rashil2000 ,
After #44 , we cannot install scoop successfully via Azure Run command (https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command).
The root cause is Write-Env does not effect via Azure Run command.
I try to output '$EnvRegisterKey.GetValue($name)' after SetValue, the value is changed. But when I open Registry Editor, I found it remains the original value.
I try to run Write-Env directly inside VM, it works.
PS D:\> .\install.ps1 -ScoopDir 'D:\test'
Downloading...
Extracting...
Creating shim...
Adding D:\test\shims to your path.
Get-ChildItem : 找不到路径“C:\Users\xxx\scoop\shims”,因为该路径不存在。
所在位置 D:\test\apps\scoop\current\lib\commands.ps1:3 字符: 12
+ + (Get-ChildItem "$scoopdir\shims") `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\xxx\scoop\shims:String
) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCh
ildItemCommand
Installation fails when instructions are followed exactly. It says the D
drive is not found.
New-Item : Cannot find drive. A drive with the name 'D' does not exist.
At line:483 char:9
+ New-Item -Type Directory $SCOOP_APP_DIR | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:String) [New-Item], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.NewItemCommand
A normal installation when Scoop's installation guidelines are followed exactly.
It has broken my VSCode while installing it. And on top of that, it fails to install.
Windows version: [e.g. 7, 8, 10] 10
OS architecture: [e.g. 32bit, 64bit] 64bit
PowerShell version: [output of "$($PSVersionTable.PSVersion)"
]
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 1645
Additional software: [(optional) e.g. ConEmu, Git] Git, Chocolatey, mysys2, vscode, .NET 6.0
Not installed.
// N/A
i cannot install i tryed installing it with non-administrator shell
I use the command iwr -useb get.scoop.sh | iex to install Scoop.
But while installing, I got an error Cannot find path 'C:\Users\XXX\scoop\apps\scoop\current\bin\scoop.ps1' because it does not exist.
I can install Scoop using the command.
Windows version: 11
OS architecture: 64bit
PowerShell version: 7.3.5
Additional software: [(optional) e.g. ConEmu, Git]
//# Your configuration here
Check if the target path of Scoop installation contains Spaces, non-ASCII characters, or it is a non-empty directory before installation then ...
Scoop isn't recognized when installed with the same instructions on the website. I tried it a second time which is shown in the screenshot below.
Second attempt:
Third attempt with verbose logging:
About:
Edition Windows 10 Home
Version 21H2
Installed on 8/13/2021
OS build 19044.2486
Experience Windows Feature Experience Pack 120.2212.4190.0
I'd like to migrate from Shovel to Scoop
PS E:\> scoop --version
PowerShell version: 7.4.2
Useragent: Shovel/1.0 (+https://shovel.ash258.com) PowerShell/7.4 (Windows NT 10.0.19045.0; Win64; x64;)
Current Scoop (Shovel) version:
52fe1646 (HEAD -> main, origin/master, origin/main, origin/HEAD) fix(Diagnostic): Better handling of migrated repos
I have lots of apps installed with shovel. I'd like to NOT break them with the migration. My personal apps are in C:\Scoop, my global apps are in c:\Scoop\ScoopGlobal (which is empty, becaus I don't install global apps).
How do I migrate?
I'm really new to this, so sorry if it's a simple fix, but whenever I paste "irm get.scoop.sh | iex" into the powershell line it fails with the following powershell text.
irm : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ irm get.scoop.sh | iex
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Windows 10 with BitDefender Free AV
fatal: could not create leading directories of '$env:DUF\scoop\apps\scoop\current': Invalid argument
...
New-Item : Cannot find drive. A drive with the name '$env' does not exist.
At ...\scoop_install.ps1:605 char:13
+ New-Item -Type Directory $SCOOP_APP_DIR | Out-Null
> $VerbosePreference='Continue'
> .\scoop_install.ps1 -ScoopDir '$env:DUF\scoop' -ScoopGlobalDir '$env:DPF\scoop_global'
VERBOSE: -------- PSBoundParameters --------
VERBOSE: [ScoopDir, $env:DUF\scoop]
VERBOSE: [ScoopGlobalDir, $env:DPF\scoop_global]
VERBOSE: -------- Environment Variables --------
VERBOSE: $env:USERPROFILE: C:\Users\...
VERBOSE: $env:ProgramData: C:\ProgramData
VERBOSE: $env:SCOOP:
VERBOSE: $env:SCOOP_CACHE:
VERBOSE: $env:SCOOP_GLOBAL:
VERBOSE: -------- Selected Variables --------
VERBOSE: SCOOP_DIR: $env:DUF\scoop
VERBOSE: SCOOP_CACHE_DIR: $env:DUF\scoop\cache
VERBOSE: SCOOP_GLOBAL_DIR: $env:DPF\scoop_global
VERBOSE: SCOOP_CONFIG_HOME: C:\Users\...\.config
Initializing...
Downloading...
VERBOSE: Cloning https://github.com/ScoopInstaller/Scoop.git to $env:DUF\scoop\apps\scoop\current
fatal: could not create leading directories of '$env:DUF\scoop\apps\scoop\current': Invalid argument
WARNING: Cloning failed. Falling back to downloading zip files.
New-Item : Cannot find drive. A drive with the name '$env' does not exist.
At ...\scoop_install.ps1:605 char:13
+ New-Item -Type Directory $SCOOP_APP_DIR | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: ($env:String) [New-Item], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.NewItemCommand
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.4046
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4046
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Use double-quotes in readme, unless there's specific reason to use single-quotes
Lines 43 to 54 in f212421
I run iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
in my GitLab CI.
The job continues even if scoop installation fails.
Add an option to exit
here, regardless of $IS_EXECUTED_FROM_IEX
:
Lines 100 to 105 in 656e17b
Possibly a duplicate of #45
Name | Value |
---|---|
PSVersion | 7.3.0-rc.1 |
PSEdition | Core |
GitCommitId | 7.3.0-rc.1 |
OS | Microsoft Windows 10.0.19045 |
Platform | Win32NT |
PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0…} |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
WSManStackVersion | 3.0 |
I'd argue that if scoop
is installed already, the installer should not abort since that would abort CI jobs.
Exit gracefully here:
Lines 151 to 154 in 656e17b
Trying to do side by side installation.
I installed scoop using the default instructions.
Now I'm trying to do a local scoop install (just for the games bucket) using:
mkdir scoop-games
cd scoop-games
Invoke-RestMethod get.scoop.sh -OutFile 'install.ps1'
$cd = (Get-Location).Path
.\install.ps1 -ScoopDir "$cd\.scoop" -ScoopGlobalDir "$cd\.scoop-global"
but it fails with Scoop is already installed.
VERBOSE: -------- PSBoundParameters --------
VERBOSE: [ScoopDir, D:\scoop-games\.scoop]
VERBOSE: [ScoopGlobalDir, D:\scoop-games\.scoop-global]
VERBOSE: -------- Environment Variables --------
VERBOSE: $env:USERPROFILE: C:\Users\jeffm
VERBOSE: $env:ProgramData: C:\ProgramData
VERBOSE: $env:SCOOP:
VERBOSE: $env:SCOOP_CACHE:
VERBOSE: $env:SCOOP_GLOBAL:
VERBOSE: -------- Selected Variables --------
VERBOSE: SCOOP_DIR: D:\scoop-games\.scoop
VERBOSE: SCOOP_CACHE_DIR: D:\scoop-games\.scoop\cache
VERBOSE: SCOOP_GLOBAL_DIR: D:\scoop-games\.scoop-global
VERBOSE: SCOOP_CONFIG_HOME: C:\Users\jeffm\.config
Initializing...
Scoop is already installed. Run 'scoop update' to get the latest version.
Name Value
---- -----
PSVersion 7.3.1
PSEdition Core
GitCommitId 7.3.1
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Allow side by side installs?
I used the standard installation method, but it then returns path not found and a path where the install.ps1 file is, as well as trying to open git.
It supposed to push through the installation procedure smoothly.
PS C:\Users\jotha> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
PS C:\Users\jotha> iwr -useb get.scoop.sh | iex
Initializing...
Downloading...
Creating shim...
Resolve-Path : Cannot find path 'C:\Users\jotha\scoop\apps\scoop\current\bin\scoop.ps1' because it does not exist.
At line:313 char:21
$relativePath = Resolve-Path -Relative $path
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PS C:\Users\jotha\scoop\shims>
Windows version: [11]
OS architecture: [64bit]
PowerShell version: [5 1 26040 1000]
Additional software: [(optional) e.g. ConEmu, Git]
//# Your configuration here
Actual implementation should be respected. Upstream implementation is possible to set using environament varibles (not script parameters).
There is no need to set -InstallPath parameter, when you set $env:SCOOP
(SCOOP_GLOBAL, SCOOP_CACHE)
All these variables should be surrounded by if ($env:SCOOP) { $SCOOP_DIR = $env:SCOOP} else { $SCOOP_DIR = $ScoopDir}
Can't install anything ever on GitHub?? Idk what to do
follow 'Readme' instruction, but at step CLI, drop the folder path on 'D:\application\Scoop'
PS C:\Users\budi> .\install.ps1 -ScoopDir 'Scoop' -ScoopGlobalDir 'F:\GlobalScoopApps' -NoProxy
Initializing...
Downloading...
Extracting...
Creating shim...
Resolve-Path : Cannot find path 'C:\Users\budi\Scoop\shims\Scoop\apps\scoop\current\bin\scoop.ps1' because it does
not exist.
At C:\Users\budi\install.ps1:313 char:21
+ $relativePath = Resolve-Path -Relative $path
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\budi\S...t\bin\scoop.ps1:String) [Resolve-Path], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
PS C:\Users\budi\Scoop\shims> cd ..
PS C:\Users\budi\Scoop> dir
Directory: C:\Users\budi\Scoop
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 5/5/2024 1:55 AM apps
d----- 5/5/2024 1:56 AM buckets
d----- 5/5/2024 1:56 AM shims
So how is the correct way of CLI one ?
#16 has introduced a new problem with:
Line 344 in 14079ad
Both checks return false
and we get:
PS C:\Users\appveyor> .\install.ps1 -RunAsAdmin
Initializing...
Downloading...
Extracting...
Creating shim...
- Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
- At C:\Users\appveyor\install.ps1:357 char:28
- + ... oopConfig | Add-Member -MemberType NoteProperty -Name $Name -Value $V ...
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : InvalidData: (:) [Add-Member], - ParameterBindingValidationException
- + FullyQualifiedErrorId : - ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
I ran the install as follows:
>iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile "$env:temp\install.ps1"
>.\AppData\Local\Temp\install.ps1 -RunAsAdmin
After which, the following output and error occurred:
Initializing...
Downloading...
Extracting...
Creating shim...
Adding C:\ProgramData\scoop\shims to your path.
- Add-Config : The property 'Count' cannot be found on this object. Verify that the property exists.
- At C:\Users\mark\AppData\Local\Temp\install.ps1:404 char:5
- + Add-Config -Name 'lastUpdate' -Value ([System.DateTime]::Now.ToSt ...
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: (:) [Add-Config], PropertyNotFoundException
- + FullyQualifiedErrorId : PropertyNotFoundStrict,Add-Config
The error appears at the end of the script, so my guess is that it is innocuous, but I am a Scoop noob so I am reporting it.
Hello,
I'm not sure which member, team, or repository is responsible for controlling the redirect for get.scoop.sh, so I'm posting this issue here.
As you may know, the domain raw.githubusercontent.com is subject to DNS poisoning and SNI filtering in mainland China, which makes it difficult to install Scoop via get.scoop.sh. One could argue that users can specify a proxy, but that's not an ideal user experience, especially for system-level proxies or proxies that can only be used after Scoop is installed. It's worth noting that the main Github.com domain is not completely blocked.
To improve the installation experience for users in mainland China, I propose the following change: modify the behavior of get.scoop.sh, which currently redirects to https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1, to instead redirect to https://cdn.jsdelivr.net/gh/scoopinstaller/install/install.ps1. This alternative link provides the same content as the original link and has better connectivity in mainland China. This change should enhance the out-of-the-box installation experience for users in the region. No other modifications are necessary at this time.
Thank you for your attention to this matter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.