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