chawyehsu / dorado

🐟 Yet Another bucket for lovely Scoop
https://chawyehsu.com/blog/talk-about-scoop-the-package-manager-for-windows-again
The Unlicense
1.06k stars 106 forks source link

[bug]When I cleanup previous versions for clash-for-windows, it will remove wpsoffice at the same time. #377

Closed SkeathyTomas closed 3 years ago

SkeathyTomas commented 3 years ago

The second time I met the bug.

C:\Users\skeathy>scoop cleanup *
Removing clash-for-windows: 0.16.4
Removing wpsoffice: 11.2.0.9396
Everything is shiny now!

C:\Users\skeathy>scoop install wpsoffice
ERROR It looks like a previous installation of wpsoffice failed.
Run 'scoop uninstall wpsoffice' before retrying the install.
WARN  'wpsoffice' (office6) is already installed.
Use 'scoop update wpsoffice' to install a new version.

C:\Users\skeathy>scoop update wpsoffice
wpsoffice: office6 (latest version)
Latest versions for all apps are installed! For more information try 'scoop status'

C:\Users\skeathy>scoop status
Scoop is up to date.
These app manifests have been removed:
    wpsoffice
These apps failed to install:
    wpsoffice
chawyehsu commented 3 years ago

scoop cleanup * removes all old versions of apps. There is nothing the bucket can do.

SkeathyTomas commented 3 years ago

scoop cleanup * removes all old versions of apps. There is nothing the bucket can do.

but it will remove the current wpsoffice and cause status error only when old versions of clash-for-windows exist. check the uninstall command please.

here is the script for wpsoffcie:

{
    "version": "11.2.0.9396",
    "description": "Complete office suite.",
    "homepage": "https://www.wps.com",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.wps.com/eula"
    },
    "url": "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/11.2.0.9396/WPSOffice_11.2.0.9396.exe",
    "hash": "7e31c48c737fed8eee2d9cdece7c3a1f8d5ec8d2dcadce807464ec11bd6db5fb",
    "pre_install": [
        "Expand-7zipArchive \"$dir\\$fname\" -Switches '-t#'",
        "Remove-Item \"$dir\\*\" -Exclude '4.7z' -Recurse",
        "Expand-7zipArchive \"$dir\\4.7z\" -ExtractDir 'office6' -Removal"
    ],
    "bin": "wpsoffice.exe",
    "shortcuts": [
        [
            "wpsoffice.exe",
            "WPS Office"
        ]
    ],
    "checkver": {
        "url": "https://pc.wps.com",
        "regex": "WPSOffice_([\\d.]+)\\.exe"
    },
    "autoupdate": {
        "url": "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/$version/WPSOffice_$version.exe"
    }
}