fedora-java / javapackages

Macros and scripts for Java packaging support
Other
7 stars 15 forks source link

Simplify after the which -> type -p change #127

Closed fridrich closed 1 week ago

fridrich commented 1 week ago

After your change which -> type p, my added branch has no much sense, since the type -p will capture all use cases that I was able to try. So, we can bin it.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.00%. Comparing base (3471e50) to head (f8a411d). Report is 16 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #127 +/- ## ======================================= Coverage 91.00% 91.00% ======================================= Files 45 45 Lines 3401 3401 ======================================= Hits 3095 3095 Misses 306 306 ``` | [Flag](https://app.codecov.io/gh/fedora-java/javapackages/pull/127/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedora-java) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/fedora-java/javapackages/pull/127/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedora-java) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedora-java#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mizdebsk commented 1 week ago

I think that it still makes sense to fall back to plain java if type -p fails. For example, consider the following scenario:

$ alias java=/usr/bin/java
$ type -p java

It prints nothing. But executing java still works.

mizdebsk commented 1 week ago

After more thought I don't think we want to support non-file Java commands such as shell functions or aliases, so I will merge this PR.