Skip to content

Running dolt sql-server creates an empty .doltcfg directory. Potential UX issue. #3881

@timsehn

Description

@timsehn

This in and of itself is not an issue but can create a confusing first hour experience issue.

Let's say I make a dolt directory and database directory like so:

mkdir ~/databases/dolt
cd ~/databases/dolt

Then I run dolt sql-server. I get a .doltcfg directory like so:

~/databases/dolt/.doltcfg

Now, if I go up a directory, maybe I want multiple databases:

cd ~/databases/
dolt sql-server

I get another .doltcfg directory

~/databases/.doltcfg

Now if I go back to cd ~/databases/dolt and run dolt sql-server. I get this error:

Failed to start server. Bad Configuration
multiple .doltcfg directories detected: '/Users/timsehn/databases/.doltcfg' and '/Users/timsehn/databases/dolt/.doltcfg'; pass one of the directories using option --doltcfg-dir

Note, I have no idea what these directories are for and they are both empty.

I see a couple potential solutions/improvements.

  1. Only write this directory when you actually need to write in it, not every time I run dolt sql-server.
  2. Don't print the above error if both directories are empty, if you have to write, write to the one you would have if none existed.
  3. Set some sort of order of preference here. Maybe always prefer the .doltcfg in the directory the server is being run in and fall back to the directory above?

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