hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f3fef43f6a2106d3f30d61ca9a9e3d32a70be864
parent af0b12f2999cd708a22edd31fadbeea0a81d8aae
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu,  4 Nov 2021 12:27:01 +0100

hare::module: skip dirs with zero inputs

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mhare/module/scan.ha | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/hare/module/scan.ha b/hare/module/scan.ha @@ -71,6 +71,9 @@ export fn scan(ctx: *context, path: str) (version | error) = { ... }; scan_directory(ctx, &ver, &sha, path, iter)?; + if (len(ver.inputs) == 0) { + return module_not_found; + }; let tmp: [sha256::SIZE]u8 = [0...]; hash::sum(&sha, tmp);