From 4993940aca25764dbd22681220d00fcc0fb45a5d Mon Sep 17 00:00:00 2001 From: jdl Date: Sat, 30 Nov 2024 07:35:54 +0100 Subject: [PATCH] cleanup --- sqlgen/template.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sqlgen/template.go b/sqlgen/template.go index 70069b2..19dc50e 100644 --- a/sqlgen/template.go +++ b/sqlgen/template.go @@ -11,7 +11,11 @@ import ( //go:embed gen.go.tmpl var fileTemplate string -func render(driver, schemaPath, outputPath string) error { +func render(driver, schemaPath, outputPath string) (err error) { + outputPath, err = filepath.Abs(outputPath) + if err != nil { + return err + } sch, err := parsePath(driver, schemaPath) if err != nil { return err