mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
cli: support absolute paths in --envfile
GITHUB_PR_NUMBER: 5768 GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5768 closes https://github.com/hasura/graphql-engine/issues/5689 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2545 Co-authored-by: cybai <6782666+CYBAI@users.noreply.github.com> Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com> GitOrigin-RevId: 38eacaaa5541a7162b584f1df1376266853fe4bf
This commit is contained in:
parent
bcb0b99f8b
commit
744cf0233e
@ -17,6 +17,7 @@ suffix-less versions. Aliases may be set by both
|
||||
- server: support MSSQL insert mutations
|
||||
- console: fix v2 metadata imports
|
||||
- cli: make `--database-name` optional in `migrate` subcommands when using a single database (#7434)
|
||||
- cli: support absolute paths in --envfile (#5689)
|
||||
|
||||
## v2.1.0-beta.1
|
||||
|
||||
|
@ -962,7 +962,10 @@ func (ec *ExecutionContext) Spin(message string) {
|
||||
|
||||
// loadEnvfile loads .env file
|
||||
func (ec *ExecutionContext) loadEnvfile() error {
|
||||
envfile := filepath.Join(ec.ExecutionDirectory, ec.Envfile)
|
||||
envfile := ec.Envfile
|
||||
if !filepath.IsAbs(ec.Envfile) {
|
||||
envfile = filepath.Join(ec.ExecutionDirectory, ec.Envfile)
|
||||
}
|
||||
err := gotenv.Load(envfile)
|
||||
if err != nil {
|
||||
// return error if user provided envfile name
|
||||
|
Loading…
Reference in New Issue
Block a user