Skip to content

feature: Use POSIX compliant command -v instead of which#498

Merged
xerial merged 1 commit intoxerial:mainfrom
KevinAtSesam:patch-1
May 8, 2024
Merged

feature: Use POSIX compliant command -v instead of which#498
xerial merged 1 commit intoxerial:mainfrom
KevinAtSesam:patch-1

Conversation

@KevinAtSesam
Copy link
Copy Markdown
Contributor

This removes the which package dependency, allowing Linux containers to run with this additional package. See #425 where I previously discussed this.

Example:

[kevin@fedora ~]$ which java
~/.sdkman/candidates/java/current/bin/java
[kevin@fedora ~]$ command -v java
/home/kevin/.sdkman/candidates/java/current/bin/java

[kevin@fedora ~]$ which scalac
~/.sdkman/candidates/scala/current/bin/scalac
[kevin@fedora ~]$ command -v scalac
/home/kevin/.sdkman/candidates/scala/current/bin/scalac

[kevin@fedora ~]$ which readlink
/usr/bin/readlink
[kevin@fedora ~]$ command -v readlink
/usr/bin/readlink
[kevin@fedora ~]$ 

Do note that POSIX dictates hard references, no ~/ support.

This removes the `which` package dependency, allowing Linux containers to run with this additional package.
@xerial xerial merged commit 9cb1a51 into xerial:main May 8, 2024
@xerial xerial changed the title Use POSIX compliant command -v feature: Use POSIX compliant command -v instead of which May 8, 2024
@xerial xerial added the feature label May 8, 2024
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 this pull request may close these issues.

2 participants