Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not add shortcuts to startmenu when installing a package #6031

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed issue with updating and importing
  • Loading branch information
insertokname committed Jun 29, 2024
commit 8ef107d71a1c5925332e1a06dd1581a6a1406b99
3 changes: 3 additions & 0 deletions libexec/scoop-import.ps1
Original file line number Diff line number Diff line change
@@ -48,6 +48,9 @@ foreach ($item in $import.apps) {
} elseif ('arm64' -in $info -and 'arm64' -ne $def_arch) {
$instArgs += '--arch', 'arm64'
}
if ('No start menu' -in $info) {
$instArgs += '--no-startmenu'
}

$app = if ($item.Source -in $bucket_names) {
"$($item.Source)/$($item.Name)"
1 change: 1 addition & 0 deletions libexec/scoop-list.ps1
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ $apps | Where-Object { !$query -or ($_.name -match $query) } | ForEach-Object {
if ($install_info.architecture -and $def_arch -ne $install_info.architecture) {
$info += $install_info.architecture
}
if ($install_info.no_add_startmenu) { $info += "No start menu" }
$item.Info = $info -join ', '

$list += [PSCustomObject]$item
4 changes: 2 additions & 2 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
@@ -375,12 +375,12 @@ function update($app, $global, $quiet = $false, $independent, $suggested, $use_c
}

if ($independent) {
install_app $app $architecture $global $suggested $use_cache $check_hash
install_app $app $architecture $global $suggested $use_cache $check_hash ($True -ne $install.no_add_startmenu)
} else {
# Also add missing dependencies
$apps = @(Get-Dependency $app $architecture) -ne $app
ensure_none_failed $apps
$apps.Where({ !(installed $_) }) + $app | ForEach-Object { install_app $_ $architecture $global $suggested $use_cache $check_hash }
$apps.Where({ !(installed $_) }) + $app | ForEach-Object { install_app $_ $architecture $global $suggested $use_cache $check_hash ($True -ne $install.no_add_startmenu) }
}
}