diff --git a/go/libraries/doltcore/env/remotes.go b/go/libraries/doltcore/env/remotes.go index ad6ff7df23..3ea6572442 100644 --- a/go/libraries/doltcore/env/remotes.go +++ b/go/libraries/doltcore/env/remotes.go @@ -692,7 +692,15 @@ func getAbsFileRemoteUrl(u *url.URL, fs filesys2.Filesys) (string, error) { } exists, isDir := fs.Exists(urlStr) - if exists && !isDir { + + if !exists { + // TODO: very odd that GetAbsRemoteUrl will create a directory if it doesn't exist. + // This concern should be separated + err = fs.MkDirs(urlStr) + if err != nil { + return "", fmt.Errorf("failed to create directory '%s': %w", urlStr, err) + } + } else if !isDir { return "", filesys2.ErrIsFile } diff --git a/integration-tests/bats/system-tables.bats b/integration-tests/bats/system-tables.bats index bd564f1363..f6546fbb93 100644 --- a/integration-tests/bats/system-tables.bats +++ b/integration-tests/bats/system-tables.bats @@ -887,7 +887,7 @@ SQL run dolt sql -q "select synopsis from dolt_help where name='dolt_backup'" [ "$status" -eq 0 ] [[ "$output" =~ "dolt backup [-v | --verbose]" ]] || false - [[ "$output" =~ "dolt backup restore [--force] " ]] || false + [[ "$output" =~ "restore [--aws-region ] [--aws-creds-type ] [--aws-creds-file ] [--aws-creds-profile ] [--force] " ]] || false run dolt sql -q "select short_description from dolt_help where name='dolt_commit'" [ "$status" -eq 0 ]