Skip to content

Commit 9007e5e

Browse files
committed
don' allow equal queries and schema paths
1 parent 3ccee33 commit 9007e5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/cmd/cmd.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ var genCmd = &cobra.Command{
127127
output := map[string]string{}
128128

129129
for i, pkg := range settings.Packages {
130+
if pkg.Schema == pkg.Queries {
131+
fmt.Fprintf(os.Stderr, "package[%d]: schema and query path must not be identical\n", i)
132+
os.Exit(1)
133+
}
134+
130135
name := pkg.Name
131136

132137
if pkg.Path == "" {

0 commit comments

Comments
 (0)