commit b55002f040371af5854fdd9e4119d05a16085c3f parent 2fd7784217e22d978868e04476c8f0e55eee2be3 Author: Ember Sawady <ecs@d2evs.net> Date: Sun, 5 Jan 2025 15:03:23 +0000 cmd/hare: limit executability error to exe output as reported by Max on hare-users Signed-off-by: Ember Sawady <ecs@d2evs.net> Diffstat:
M | cmd/hare/build.ha | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha @@ -268,9 +268,13 @@ fn get_output(goal: build::stage, input: str) (str | error) = { // XXX: double cast here (and below) shouldn't be necessary return output: output_exists: error; }; - if (!fs::isfile(stat.mode) - || fs::mode_perm(stat.mode) & fs::mode::USER_X == 0) { + if (fs::mode_perm(stat.mode) & fs::mode::USER_X == 0 + && goal == build::stage::BIN) { return output: output_exists: error; }; + if (!fs::isfile(stat.mode)) { + return output: output_exists: error; + }; + return output; };