forgejo-release.sh checks in BIN_DIR / TMP_DIR for tea instead of PATH #51
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
actions/forgejo-release#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When using a non-debian based distribution or OS like FreeBSD there is no dpkg or apt-get and tea is installed in PATH.
However the release shellscript explicitly checks in BIN_DIR for tea:
if ! test -f "$BIN_DIR"/tea; thenThis prevents the usage of this action on runners on non-debian based distributions.
It could check if the command is already installed just like in the function
setup_apiwhich checks forcurlandjq.Something like this could work :
But the
BIN_DIRvariable would remain an issue in other places in the script and you can't override it from the action.My main issue comes from the fact that Alpine Linux doesn't just print
amd64butmusl-linux-amd64when runningdpkg --print-architectureso I wanted to avoid going inside this condition. Maybe there's a more overall solution to this issue that would help with different distros & OS.Maybe an approach that could work :
$BIN_TEAtowhich tea$BIN_TEAto$TMP_DIR/tea$BIN/teaby$BIN_TEA