You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the -dir flag is unset, the default goose behaviour is to default to the current directory . This behaviour is confusing, and usually (I think) the result of user error.
As an example, if I run a goose command such as down, up, status, etc. and accidentally forget to set the -dir flag (default to .) then goose will happily run the command and the output can be a bit misleading:
goose: no migrations to run. current version: 11
Little does the user know that no files were actually found.
I think we should improve this behaviour. Either check the current dir is . and error if no .sql or .go files are found, or do this universally for any directory where no .sql or .go files are found.
The text was updated successfully, but these errors were encountered:
If the
-dir
flag is unset, the default goose behaviour is to default to the current directory.
This behaviour is confusing, and usually (I think) the result of user error.As an example, if I run a goose command such as
down
,up
,status
, etc. and accidentally forget to set the-dir
flag (default to.
) then goose will happily run the command and the output can be a bit misleading:Little does the user know that no files were actually found.
I think we should improve this behaviour. Either check the current dir is
.
and error if no .sql or .go files are found, or do this universally for any directory where no .sql or .go files are found.The text was updated successfully, but these errors were encountered: