From c6ea9725a7ea573d6c4e946296a765e723126c64 Mon Sep 17 00:00:00 2001 From: Stephanie You Date: Thu, 16 Nov 2023 17:48:00 -0800 Subject: [PATCH] minor updates --- go/cmd/dolt/dolt.go | 8 ++++---- integration-tests/bats/config.bats | 3 +-- integration-tests/bats/no-repo.bats | 3 +-- integration-tests/bats/profile.bats | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/go/cmd/dolt/dolt.go b/go/cmd/dolt/dolt.go index 2ddd9a4cce..5c09e820eb 100644 --- a/go/cmd/dolt/dolt.go +++ b/go/cmd/dolt/dolt.go @@ -440,10 +440,6 @@ func runMain() int { var fs filesys.Filesys fs = filesys.LocalFS dEnv := env.Load(ctx, env.GetCurrentUserHomeDir, fs, doltdb.LocalDirDoltDB, Version) - if dEnv.CfgLoadErr != nil { - cli.PrintErrln(color.RedString("Failed to load the global config. %v", dEnv.CfgLoadErr)) - return 1 - } dEnv.IgnoreLockFile = ignoreLockFile root, err := env.GetCurrentUserHomeDir() @@ -452,6 +448,10 @@ func runMain() int { return 1 } + if dEnv.CfgLoadErr != nil { + cli.PrintErrln(color.RedString("Failed to load the global config. %v", dEnv.CfgLoadErr)) + return 1 + } globalConfig, ok := dEnv.Config.GetConfig(env.GlobalConfig) if !ok { cli.PrintErrln(color.RedString("Failed to get global config")) diff --git a/integration-tests/bats/config.bats b/integration-tests/bats/config.bats index 427b735735..f9e0cf0b32 100644 --- a/integration-tests/bats/config.bats +++ b/integration-tests/bats/config.bats @@ -290,7 +290,6 @@ teardown() { @test "config: config doesn't need write permission in current dir" { chmod 111 . - run dolt config --list - [ "$status" -eq 0 ] + dolt config --list chmod 755 . } diff --git a/integration-tests/bats/no-repo.bats b/integration-tests/bats/no-repo.bats index d58fa4ba87..d87a8e13ef 100755 --- a/integration-tests/bats/no-repo.bats +++ b/integration-tests/bats/no-repo.bats @@ -130,8 +130,7 @@ teardown() { @test "no-repo: dolt version does not need write permissions" { chmod 111 . - run dolt version - [ "$status" -eq 0 ] + dolt version chmod 755 . } diff --git a/integration-tests/bats/profile.bats b/integration-tests/bats/profile.bats index b77c46abc1..405c6522a9 100755 --- a/integration-tests/bats/profile.bats +++ b/integration-tests/bats/profile.bats @@ -391,7 +391,6 @@ teardown() { @test "profile: profile doesn't need write permission in current dir" { chmod 111 . - run dolt profile - [ "$status" -eq 0 ] + dolt profile chmod 755 . }