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] scoop reset failed for global installed apps #4819

Closed
ooooo84 opened this issue Mar 17, 2022 · 6 comments · Fixed by #4896
Closed

[Bug] scoop reset failed for global installed apps #4819

ooooo84 opened this issue Mar 17, 2022 · 6 comments · Fixed by #4896
Labels

Comments

@ooooo84
Copy link

ooooo84 commented Mar 17, 2022

Bug Report

Current Behavior

Here are some JDKs installed globally by scoop:
图片

when i use scoop reset temurin11-jdk, it saids ERROR 'temurin11-jdk' isn't installed

Expected Behavior

Successfully reset shims and environment variables

Additional context/output

Possible Solution

System details

Windows version: 10

OS architecture: 64bit

PowerShell version: 5.1.19041.1320

Scoop Configuration

{
    "lastupdate":  "2022-03-17T08:04:45.0044426+08:00",
    "SCOOP_REPO":  "http://github.com/ScoopInstaller/Scoop",
    "SCOOP_BRANCH":  "master",
    "aria2-enabled":  false,
    "aria2-config":  false,
    "proxy":  "127.0.0.1:10809"
}
@ooooo84 ooooo84 added the bug label Mar 17, 2022
@milsav92
Copy link

It seems that the function installed from lib/core.ps1 has the following definition:

function installed($app, $global)

but in libexec/scoop-reset.ps1 it is used as:

    if(!(installed $app)) {
        error "'$app' isn't installed"
        return
    }

Temporary solution seems to be to change libexec/scoop-reset.ps1 to use:

    if(!(installed $app $global)) {
        error "'$app' isn't installed"
        return
    }

@ooooo84
Copy link
Author

ooooo84 commented Mar 20, 2022

It seems that the function installed from lib/core.ps1 has the following definition:

function installed($app, $global)

but in libexec/scoop-reset.ps1 it is used as:

    if(!(installed $app)) {
        error "'$app' isn't installed"
        return
    }

Temporary solution seems to be to change libexec/scoop-reset.ps1 to use:

    if(!(installed $app $global)) {
        error "'$app' isn't installed"
        return
    }

it works, thank you

@rashil2000
Copy link
Member

Hey @milsav92, can you make a PR for the fix?

@niheaven
Copy link
Member

niheaven commented Mar 21, 2022

This has been fixed in #4798

image

@hgkamath
Copy link

hgkamath commented Mar 22, 2022

I had penned a comment in Pull #4798 (comment)
I just realized it was penned under a code review and not a bug report.

@hgkamath
Copy link

hgkamath commented Apr 19, 2022

Just confirming #4796
As @wisdomtooth mentioned, these runtime dependencies have been installed as global -g and it is preferable that way.

PS C:\vol\scoop_01\scoop\buckets\extras> scoop status
Scoop is up to date.
Missing runtime dependencies:
    'android-sdk' requires 'adb'
    'scrcpy' requires 'adb'
    'sndcpy' requires 'adb', 'extras/vlc'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants