Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephanie You committed Nov 17, 2023
1 parent 0f5a26a commit c6ea972
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions go/cmd/dolt/dolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"))
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/bats/config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
}
3 changes: 1 addition & 2 deletions integration-tests/bats/no-repo.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
}

Expand Down
3 changes: 1 addition & 2 deletions integration-tests/bats/profile.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
}

0 comments on commit c6ea972

Please sign in to comment.