relative config file path from cwd bug

This commit is contained in:
Neil Macneale IV
2024-12-26 16:42:20 -08:00
parent 736c490cf1
commit 06f747afdd
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -341,7 +341,7 @@ func ServerConfigFromArgsWithReader(
return nil, err
}
serverConfig, err := getServerConfig(dEnv.FS, apr, dataDir, reader)
serverConfig, err := getServerConfig(cwd, apr, dataDir, reader)
if err != nil {
return nil, fmt.Errorf("bad configuration: %w", err)
}
+8 -1
View File
@@ -885,7 +885,14 @@ type bootstrapConfig struct {
// |terminate| is set to true if the process should end for any reason. Errors or messages to the user will be printed already.
// |status| is the exit code to terminate with, and can be ignored if |terminate| is false.
func createBootstrapConfig(ctx context.Context, args []string) (cfg *bootstrapConfig, terminate bool, status int) {
cwdFs := filesys.LocalFS
lfs := filesys.LocalFS
cwd, err := lfs.Abs("")
cwdFs, err := lfs.WithWorkingDir(cwd)
if err != nil {
cli.PrintErrln(color.RedString("Failed to load the current working directory: %v", err))
return nil, true, 1
}
tmpEnv := env.LoadWithoutDB(ctx, env.GetCurrentUserHomeDir, cwdFs, doltversion.Version)
var globalConfig config.ReadWriteConfig
+1 -1
View File
@@ -1362,7 +1362,7 @@ END""")
[[ $output =~ "test2" ]] || false
}
@test "sql-server: fetch uses database tempdir from different working directory" {
@test "sql-server: fetch uses database data dir from different working directory" {
skiponwindows "Missing dependencies"
mkdir remote1