Ph0enixKM / Amber

💎 Amber the programming language compiled to bash
https://amber-lang.com
GNU General Public License v3.0
3.54k stars 70 forks source link

✨ [Improvement] don't hardcode path to bash #109

Closed jhheider closed 1 month ago

jhheider commented 1 month ago

While it's true that /bin/bash in compiler.rs is a nearly foolproof method, certain environment managers, like pkgx, may provide bash on a system on which it is not otherwise globally installed. Either trusting the path, or calling /usr/bin/env bash -c ... allows for a wider variety of supported shells.

Extremely minor issue, to be sure, but something I came across while packaging the compiler.

sweetbbak commented 1 month ago

Yea, this will also fail on NixOS, whereas '#!/usr/bin/env bash' will not. env being the only binary accessible in /usr/bin on NixOS.

Ph0enixKM commented 1 month ago

@sweetbbak this issue will be solved in https://github.com/Ph0enixKM/Amber/pull/110#pullrequestreview-2079123482