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]: busybox should not install a bash shim #6179

Open
3 tasks done
rkitover opened this issue Sep 9, 2024 · 6 comments
Open
3 tasks done

[Bug]: busybox should not install a bash shim #6179

rkitover opened this issue Sep 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@rkitover
Copy link

rkitover commented Sep 9, 2024

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

busybox

Expected/Current Behaviour

I expect the bash command to run my installed "Windows Subsystem for Linux" bash command, instead I have the bash shim from the "busybox" package in my $env:PATH.

Steps to Reproduce

scoop install busybox
bash

Possible Solution

Remove the bash shim from the "busybox" package.

The busybox sh is NOT bash, it is a derivate of the "ash" POSIX sh.

It does not execute bash code.

It is absolutely sufficient to have a sh shim, which the "busybox" package also provides already.

Scoop and Buckets Version

Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)

'main' bucket:
418d5944a (HEAD -> master, origin/master, origin/HEAD) uv: Update to version 0.4.6

'extras' bucket:
a3b640b67 (HEAD -> master, origin/master, origin/HEAD) saber: Update to version 0.24.6

'nerd-fonts' bucket:
537ea9f4 (HEAD -> master, origin/master, origin/HEAD) LXGWNeoXiHei: Update to version 1.202

Scoop Config

last_update         scoop_branch scoop_repo
-----------         ------------ ----------
9/6/2024 3:32:37 AM master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             Microsoft Windows 10.0.27695
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

Windows Subsystem for Linux

@rkitover rkitover added the bug Something isn't working label Sep 9, 2024
@HUMORCE
Copy link
Member

HUMORCE commented Sep 12, 2024

scoop shim rm bash

@rkitover
Copy link
Author

Thank you, that helps, but I still believe it should not be installed in the first place.

@rkitover
Copy link
Author

Is there a way to add a hook so that when this package is updated I can run this command?

@HUMORCE
Copy link
Member

HUMORCE commented Sep 17, 2024

Is there a way to add a hook so that when this package is updated I can run this command?

No.

But you can install busybox-lean and create shims you want, or maintain it on your own bucket. due to the update frequency of busybox , you can maintain it completely locally:

cd ~\scoop\buckets
mkdir <your_local_bucket_name>\bucket
cp main\bucket\busybox.json <your_local_bucket_name>\bucket
# Edit <your_local_bucket_name>\bucket\busybox.json 
# Install it: scoop install <your_local_bucket_name>/busybox

@HUMORCE
Copy link
Member

HUMORCE commented Sep 24, 2024

I noticed that this may be an issue with the order of your PATH env var rather than this manifest.

❯ scoop shim list bash

Name     Source  Alternatives IsGlobal IsHidden
----     ------  ------------ -------- --------
bash     busybox busybox git  False    True
git-bash git                  False    False


❯ scoop which bash
C:\Windows\system32\bash.exe

❯ Get-Command bash -all

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     bash.exe                                           10.0.2262… C:\Windows\system32\bash.exe
Application     bash.exe                                           0.0.0.0    C:\Users\humorce\scoop\shims\bash.exe
Application     bash.exe                                           0.0.0.0    C:\Users\humorce\AppData\Local\Microsoft\WindowsApps…

@rkitover
Copy link
Author

I am running an insider build and I don't have the C:\Windows\system32\bash.exe executable.

The other two entries are in the same order in my $env:PATH with the scoop shim taking priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants