Skip to content

dotenv not working for sqlx database ... CLI commands #1431

Closed

Description

@xpe

Currently dotenv isn't working for sqlx database ... commands. This is a regression caused by commit 0e51272. (That commit was created as a response to #1391.)

For example, testing on the master branch that includes 0e51272 :

% sqlx database drop
error: The following required arguments were not provided:
    --database-url <database-url>

USAGE:
    sqlx database drop [FLAGS] --database-url <database-url>

For more information try --help

Testing on a similar branch that excludes the 0e51272 commit:

% sqlx database drop                   
Drop database at postgres://foo_dev@localhost/foo_dev? (y/n): y

The .env file for both is:

DATABASE_URL=postgres://foo_dev@localhost/foo_dev

Activity

  1. xpe commented on Sep 8, 2021

    @xpe
    ContributorAuthor

    Please see the PR over at #1432.

  2. added a commit that references this issue on Sep 10, 2021
  3. abonander commented on Sep 10, 2021

    @abonander
    Collaborator

    Closed by #1432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions