forked from prisma/prisma-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(psl): handle named args in ds url env (prisma#4958)
We now correctly propagate warnings from the ds url env and emit a warning for the usage of named arguments in the ds url env function
- Loading branch information
Showing
5 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
psl/psl/tests/validation/datasource/url_empty_named_arg.prisma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
datasource testds { | ||
provider = "mysql" | ||
url = env(named: ) | ||
} | ||
|
||
// [1;91merror[0m: [1mThe env function expects a singular, unnamed, string argument.[0m | ||
// [1;94m-->[0m [4mschema.prisma:3[0m | ||
// [1;94m | [0m | ||
// [1;94m 2 | [0m provider = "mysql" | ||
// [1;94m 3 | [0m url = [1;91menv(named: )[0m | ||
// [1;94m | [0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
datasource testds { | ||
provider = "mysql" | ||
url = env(named: "DATABASE_URL") | ||
} | ||
|
||
// [1;93mwarning[0m: [1mThe env function doesn't expect named arguments[0m | ||
// [1;94m-->[0m [4mschema.prisma:3[0m | ||
// [1;94m | [0m | ||
// [1;94m 2 | [0m provider = "mysql" | ||
// [1;94m 3 | [0m url = env([1;93mnamed: "DATABASE_URL"[0m) | ||
// [1;94m | [0m |