Skip to content

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

Merged
niheaven merged 2 commits intodevelopfrom
fix-bash
Jun 11, 2024
Merged

fix(core): Use correct path in 'bash'#6006
niheaven merged 2 commits intodevelopfrom
fix-bash

Conversation

@niheaven
Copy link
Copy Markdown
Member

@niheaven niheaven commented Jun 7, 2024

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:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@niheaven niheaven merged commit a9ca75c into develop Jun 11, 2024
@niheaven niheaven deleted the fix-bash branch June 11, 2024 03:03
@yoBlastic
Copy link
Copy Markdown

That was quick!

how do I apply the fix?

@niheaven
Copy link
Copy Markdown
Member Author

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

@yoBlastic
Copy link
Copy Markdown

yoBlastic commented Jun 19, 2024 via email

@yoBlastic
Copy link
Copy Markdown

scoop config SCOOP_BRANCH develop

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

even scoop help doesnt work

@niheaven
Copy link
Copy Markdown
Member Author

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Member Author

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

@yoBlastic
Copy link
Copy Markdown

yes, it is there.

@niheaven
Copy link
Copy Markdown
Member Author

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

@yoBlastic
Copy link
Copy Markdown

Screenshot 2024-06-19 023421

@niheaven
Copy link
Copy Markdown
Member Author

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
Copy link
Copy Markdown

no change

@yoBlastic
Copy link
Copy Markdown

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 (#3050) copying the "current" folder and naming it "new" and now my commands are being recognized, scoop help , scoop config are working.

image

@yoBlastic
Copy link
Copy Markdown

result:

image

@niheaven
Copy link
Copy Markdown
Member Author

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

@yoBlastic
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Member Author

Unrelated IMO...

@maherm
Copy link
Copy Markdown

maherm commented Aug 19, 2024

This change does now suppress any output to sterr. That seems like a bug. stderr is a valid output channel and you are losing information when the output on this channel is suppressed. e.g. a wrong or missing argument will usually trigger an output on stderr and maybe some usage instructions too. Now, the script just terminates without any output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants