Scoop
Scoop copied to clipboard
`scoop update` and latest nightlies
I regularly run scoop update; scoop status to keep all my apps up to date:
> scoop update
Updating Scoop...
Updating 'extras' bucket...
Updating 'java' bucket...
Updating 'main' bucket...
Updating 'nerd-fonts' bucket...
Updating 'versions' bucket...
> scoop status
Scoop is up to date.
Everything is ok!
Today I wanted to try VSCode's new PowerShell Notebook Mode. Since it requires latest vscode-insiders nightly, I updated:
> scoop update vscode-insiders
vscode-insiders: nightly-20200710 (latest version)
Latest versions for all apps are installed! For more information try 'scoop status'
So far so good, but Notebook Mode wasn't working. After some investigation, it turned out to be my version being too old, which seemed odd, as I had just updated it. So I tried force updating, and only then the actual latest nightly was downloaded and installed:
> scoop update vscode-insiders -f
vscode-insiders: nightly-20200710 -> nightly
Updating one outdated app:
WARN This is a nightly version. Downloaded files won't be verified.
Updating 'vscode-insiders' (nightly-20200710 -> nightly-20200801)
Downloading new version
dl.7z (79.2 MB) [====================================================================================================================================================================================] 100%
vscode-install-context.reg (652 B) [=================================================================================================================================================================] 100%
vscode-uninstall-context.reg (488 B) [===============================================================================================================================================================] 100%
Uninstalling 'vscode-insiders' (nightly-20200710)
Removing shim for 'code-insiders'.
Unlinking ~\scoop\apps\vscode-insiders\current
WARN This is a nightly version. Downloaded files won't be verified.
Installing 'vscode-insiders' (nightly-20200801) [64bit]
Loading dl.7z from cache
Loading vscode-install-context.reg from cache
Loading vscode-uninstall-context.reg from cache
Extracting dl.7z ... done.
Linking ~\scoop\apps\vscode-insiders\current => ~\scoop\apps\vscode-insiders\nightly-20200801
Creating shim for 'code-insiders'.
Creating shortcut for Visual Studio Code - Insiders (Code - Insiders.exe)
Running post-install script...
'vscode-insiders' (nightly-20200801) was installed successfully!
Notes
-----
Add Visual Studio Code as a context menu option by running: "C:\Users\Daniel\scoop\apps\vscode-insiders\current\vscode-install-context.reg"
I found it a bit confusing that scoop update; scoop status would report all apps are up to date, yet force updating an app would somehow manage to find even newer versions.
In this case I knew I could force update vscode-insiders, because I learned there was a newer version by other means, but it would be nice if Scoop handled this and reported newer nightlies. I tried running scoop update * -f but it was rather slow as it seems to re-download every app, not just those that have updates.
Yeah Scoop isn't following up on the nightly releases for vscode insiders with scoop update *, but using scoop update vscode-insiders -f did update it today.
Nightly manifests do not have version information or hashes. You need to update them with the --force parameter.
@rashil2000 the entire point of nightlies is to get updates every day. I expected scoop to update my nightlies every day. This isn't the behavior I expected. Now I must update my nightlies separately then. If I wanted to hold the nightly, there's already a way to do that.
I want to vote for making --force implied for nightly apps.
I want to vote for making --force implied for nightly apps.
That will be an unexpected and breaking change for a lot of users. I'm not against adding it, but I'm against changing core functionality that users are used to for so long.
scoop update --nighties or some other flag or a global config/env var?
problem:
scoop update * --force will force updates on things that haven't changed.
To solve that, you need have a separate command for nightlies, then update that command when you add more nightly apps.
I tried to workaround that by trying scoop update *-nightly, but that doesn't work. I wanted that to match any app that ends with '-nightly' like linux wildcard handling would.
Scoop's currently nightly handling seems to be a sore spot for users who use nightlies. This issue has a few users who expected scoop update * to handle them since it will update everything else. Some apps just do 'rolling releases' so nightlies are the only 'version' available.
--force isn't exactly ideal either since you can run multiple times and it will grab the same nightly. Seems like there should be an easy way to track the version. On install, scoop makes a folder called nightly-YYYY-MM-DD. You can use that to check the "nightly version". Use the system date, if the latest "nightly-YYYY-MM-DD" is < today's date then must be an update (assume nightly - today's date). So not sure why --force is even needed, when the nighly version installed is known and it's at least 1 day in the future from that date.
A config option (off by default) to update nightlies, if their present version is detected as more than a day old (which you described), seems like a good idea to me.
Would you like to work on this?
i may, seems low effort. where should I start?
Here: https://github.com/ScoopInstaller/Scoop/blob/04b30de9dde613acec8bb0014b42f381f83e2ec9/lib/versions.ps1#L151-L154
I have made a small PowerShell function. I have added it to my personal .psm1 module loaded on starting of powershell.
function Update-ScoopNightly {
[CmdletBinding()]
param (
)
begin {
Write-Verbose "Start"
}
process {
$nightly = scoop list | Where-Object -Property Version -like "*nightly*" | Select-Object Name
foreach ($item in $nightly) {
Write-Verbose "Force updating $item.Name"
scoop update $item.Name --force
}
}
end {
Write-Verbose "End"
}
}
Invoke it by using Update-ScoopNightly