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

[Bug] Install json file named scoop.json will break scoop #5808

Open
lxl66566 opened this issue Feb 18, 2024 · 0 comments
Open

[Bug] Install json file named scoop.json will break scoop #5808

lxl66566 opened this issue Feb 18, 2024 · 0 comments
Labels

Comments

@lxl66566
Copy link

lxl66566 commented Feb 18, 2024

Bug Report

I am new to being a Scoop packer and have incorrectly written manifests into json named scoop.json. However, after installing it, Scoop breaks.

Current Behavior

scoop install https://raw.githubusercontent.com/lxl66566/urldecoder/0c78ef13a736c616f2eabe0e38c3c892eda57df5/scoop.json

Expected Behavior

The software should be installed. Or at least, the software will not be installed, and Scoop itself should not break.

Additional context/output

C:\Users\lxl>scoop install https://raw.githubusercontent.com/lxl66566/urldecoder/0c78ef13a736c616f2eabe0e38c3c892eda57df5/scoop.json
WARN  Purging previous failed installation of scoop.
WARN  This will uninstall Scoop and all the programs that have been installed with Scoop!
Are you sure? (yN):
WARN  Purging previous failed installation of scoop.
WARN  This will uninstall Scoop and all the programs that have been installed with Scoop!
Are you sure? (yN):
Installing 'scoop' (1.0.1) [64bit]
Loading urldecoder-x86_64-pc-windows-msvc.zip from cache
Checking hash of urldecoder-x86_64-pc-windows-msvc.zip ... ok.
Extracting urldecoder-x86_64-pc-windows-msvc.zip ... done.
Linking D:\scoop\apps\scoop\current => D:\scoop\apps\scoop\1.0.1
Creating shim for 'urldecoder'.
WARN  Overwriting shim ('urldecoder.exe' -> 'urldecoder.exe') installed from urldecoder
Copy-Item: D:\scoop\apps\scoop\current\lib\core.ps1:718
Line |
 718 |          Copy-Item (get_shim_path) "$shim.exe" -Force
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'D:\scoop\apps\scoop\current\supporting\shims\kiennq\shim.exe' because it does not exist.
'scoop' (1.0.1) was installed successfully!

C:\Users\lxl>scoop
The argument 'D:\scoop\apps\scoop\current\bin\scoop.ps1' is not recognized as the name of a script file. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

It appears that Scoop broke even though I chose the default option 'N' for both "Are you sure? (yN):" prompts.

It seems like scoop itself has been overwrited.

I tried to delete scoop\apps\scoop folder, but it doesn't work. After I deleted scoop\shims\scoop*, and reinstalled scoop, this time it works.

Possible Solution

Disallow insecure installations and provide a warning in the wiki. (I couldn't find some information in the wiki.)

Or, make the folder name not depend on the json name?

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 5.1.22621.2506

Additional software: Git

Scoop Configuration

{
    "last_update":  "2024-02-18T11:42:27.4015236+08:00",
    "proxy":  "127.0.0.1:10450",
    "cache_path":  "Z:/scoopcache",
    "alias":  {

              },
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop",
    "scoop_branch":  "master",
    "root_path":  "D:\\scoop"
}
@lxl66566 lxl66566 added the bug label Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant