ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.32k stars 1.37k forks source link

fix(core): Use correct path in 'bash' #6006

Closed niheaven closed 3 weeks ago

niheaven commented 3 weeks ago

Description

Since Windows 11 add default bash.exe in system folder, there may be bugs when using linux apps. This PR fixes it by converting Windows path using proper utils (wslpath in WSL and cygpath in Cygwin/MSYS2).

Motivation and Context

How Has This Been Tested?

By running neofetch under Powershell, CMD, WSL, Cygwin and MSYS2.

Checklist:

yoBlastic commented 2 weeks ago

That was quick!

how do I apply the fix?

niheaven commented 2 weeks ago

You could use scoop config SCOOP_BRANCH develop to switch to develop branch, and use scoop reset xxx to reset your shim.

yoBlastic commented 2 weeks ago

i dont know what 1/2 that stuff is. I dont wanna flood the board with noob questions, but thanks anyway, ill see what I can figure out.

On Wednesday, June 19th, 2024 at 2:11 AM, Hsiao-nan Cheung @.***> wrote:

You could use scoop config SCOOP_BRANCH develop to switch to develop branch, and use scoop reset xxx to reset your shim.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

yoBlastic commented 2 weeks ago

scoop config SCOOP_BRANCH develop

"WARN scoop: 'config' isn't a scoop command. See 'scoop help'"

even scoop help doesnt work

niheaven commented 2 weeks ago

Hmm, scoop config error? It's scoop's internal command, please check your input, or try scoop config and see if it could output sth.

yoBlastic commented 2 weeks ago

Hmm, scoop config error? It's scoop's internal command, please check your input, or try scoop config and see if it could output sth.

same thing.... but again, im a noob. not dumb, but noob/ish nonetheless.

niheaven commented 2 weeks ago

Okay, please check if there's scoop-config.ps1 in your Scoop\apps\scoop\current\libexec\ dir.

yoBlastic commented 2 weeks ago

yes, it is there.

niheaven commented 2 weeks ago

Then scoop config will be there, too... What's about other command? e.g. scoop reset xxx or scoop shim list?

yoBlastic commented 2 weeks ago

Screenshot 2024-06-19 023421

niheaven commented 2 weeks ago

Could you download https://[raw.githubusercontent.com/ScoopInstaller/Scoop/master/bin/scoop.ps1](https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/bin/scoop.ps1) and put it under Scoop\apps\scoop\current\bin (with overwrite), then try again?

yoBlastic commented 2 weeks ago

no change

yoBlastic commented 1 week ago

Could you download https://[raw.githubusercontent.com/ScoopInstaller/Scoop/master/bin/scoop.ps1](https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/bin/scoop.ps1) and put it under Scoop\apps\scoop\current\bin (with overwrite), then try again?

Thanks again in your attempt to help me out. Seems I had a secondary issue (https://github.com/ScoopInstaller/Scoop/issues/3050) copying the "current" folder and naming it "new" and now my commands are being recognized, scoop help , scoop config are working.

image

yoBlastic commented 1 week ago

result:

image

niheaven commented 1 week ago

You should run scoop update after scoop config. Okay, now it should work fine.

yoBlastic commented 6 days ago

You should run scoop update after scoop config. Okay, now it should work fine.

its working! though, neofetch is showing my ubuntu WSL and now windows. whatever

what you waked me through seems to be a manual fix for just that app/shim, im I understanding that right?

im having a similar issue now tying to install a CAB file for some hardware im messing with.... related or no? pic:

image

niheaven commented 6 days ago

Unrelated IMO...