Changing the command line to identify a valid dolt repository by looking for .dolt/noms instead of just .dolt

Related to https://github.com/dolthub/dolt/issues/7873
This commit is contained in:
Jason Fulghum
2024-05-17 11:36:40 -07:00
parent 3446e28ea5
commit c490affcbb

View File

@@ -254,7 +254,7 @@ func (hc SubCommandHandler) handleCommand(ctx context.Context, commandStr string
// CheckEnvIsValid validates that a DoltEnv has been initialized properly and no errors occur during load, and prints
// error messages to the user if there are issues with the environment or if errors were encountered while loading it.
func CheckEnvIsValid(dEnv *env.DoltEnv) bool {
if !dEnv.HasDoltDir() {
if !dEnv.HasDoltDataDir() {
PrintErrln(color.RedString("The current directory is not a valid dolt repository."))
PrintErrln("run: dolt init before trying to run this command")
return false