From 5cb0c289c021ba0ad786907cb8cb5d28e29dd8c3 Mon Sep 17 00:00:00 2001 From: David Pearce Date: Mon, 25 Nov 2024 13:53:24 +1300 Subject: [PATCH] Fix for reading `bin` files (#385) The problem was that the extension was not being correctly matched for `bin` files, leading the tool to try and parse them as lisp files. --- pkg/cmd/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/util.go b/pkg/cmd/util.go index c3e3ec0f..c6cb699b 100644 --- a/pkg/cmd/util.go +++ b/pkg/cmd/util.go @@ -138,7 +138,7 @@ func readSchema(filenames []string) *hir.Schema { if len(filenames) == 0 { fmt.Println("source or binary constraint(s) file required.") os.Exit(5) - } else if len(filenames) == 1 && path.Ext(filenames[0]) == "bin" { + } else if len(filenames) == 1 && path.Ext(filenames[0]) == ".bin" { // Single (binary) file supplied return readBinaryFile(filenames[0]) }