fix: updates

This commit is contained in:
2026-06-23 14:27:06 +02:00
parent 67d95475ee
commit 0c249b847c
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -278,11 +278,11 @@ func runServer() {
// is the follow-up (M5 partial).
w.Header().Set("Content-Security-Policy",
"default-src 'self'; "+
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; "+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net; "+
"style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; "+
"img-src 'self' data: https:; "+
"connect-src 'self'; "+
"font-src 'self' data: https://cdn.jsdelivr.net")
"font-src 'self' data: https://cdn.jsdelivr.net https://fonts.scalar.com")
w.Header().Set("Content-Type", "text/html")
w.Write([]byte(`<!doctype html><html><head><title>API</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
+9 -9
View File
@@ -283,11 +283,11 @@ func result(pm manager, pkgs []Package) *ListOutput {
func (m manager) installArgs(name string) (string, []string) {
switch m.name {
case "dnf":
return "dnf", []string{"install", "-y", "--", name}
return "dnf", []string{"install", "-y", name}
case "apt":
return "apt-get", []string{"install", "-y", "--", name}
return "apt-get", []string{"install", "-y", name}
case "pacman":
return "pacman", []string{"-S", "--noconfirm", "--", name}
return "pacman", []string{"-S", "--noconfirm", name}
}
return "", nil
}
@@ -295,11 +295,11 @@ func (m manager) installArgs(name string) (string, []string) {
func (m manager) removeArgs(name string) (string, []string) {
switch m.name {
case "dnf":
return "dnf", []string{"remove", "-y", "--", name}
return "dnf", []string{"remove", "-y", name}
case "apt":
return "apt-get", []string{"remove", "-y", "--", name}
return "apt-get", []string{"remove", "-y", name}
case "pacman":
return "pacman", []string{"-R", "--noconfirm", "--", name}
return "pacman", []string{"-R", "--noconfirm", name}
}
return "", nil
}
@@ -322,11 +322,11 @@ func (m manager) upgradeArgs() (string, []string) {
func (m manager) upgradeOneArgs(name string) (string, []string) {
switch m.name {
case "dnf":
return "dnf", []string{"upgrade", "-y", "--", name}
return "dnf", []string{"upgrade", "-y", name}
case "apt":
return "apt-get", []string{"install", "--only-upgrade", "-y", "--", name}
return "apt-get", []string{"install", "--only-upgrade", "-y", name}
case "pacman":
return "pacman", []string{"-S", "--noconfirm", "--", name}
return "pacman", []string{"-S", "--noconfirm", name}
}
return "", nil
}