mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-25 00:54:51 -06:00
allow sqlserver prefix variables in dolt config
This commit is contained in:
@@ -227,7 +227,7 @@ func addOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, usa
|
||||
for i := 0; i < len(args); i += 2 {
|
||||
option := strings.ToLower(args[i])
|
||||
value := args[i+1]
|
||||
if _, ok := ConfigOptions[option]; !ok {
|
||||
if _, ok := ConfigOptions[option]; !ok && !strings.HasPrefix(option, env.SqlServerGlobalsPrefix) {
|
||||
cli.Println("error: invalid config option, use dolt config --help to check valid configuration variables")
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
@@ -462,7 +463,7 @@ func runMain() int {
|
||||
}
|
||||
|
||||
globalConfig.Iter(func(name, val string) (stop bool) {
|
||||
if _, ok := commands.ConfigOptions[name]; !ok {
|
||||
if _, ok := commands.ConfigOptions[name]; !ok && !strings.HasPrefix(name, env.SqlServerGlobalsPrefix) {
|
||||
cli.Println(color.YellowString("Warning: Unknown global config option '%s'. Use `dolt config --global --unset %s` to remove.", name, name))
|
||||
}
|
||||
return false
|
||||
@@ -472,7 +473,7 @@ func runMain() int {
|
||||
localConfig, ok := dEnv.Config.GetConfig(env.LocalConfig)
|
||||
if ok {
|
||||
localConfig.Iter(func(name, val string) (stop bool) {
|
||||
if _, ok := commands.ConfigOptions[name]; !ok {
|
||||
if _, ok := commands.ConfigOptions[name]; !ok && !strings.HasPrefix(name, env.SqlServerGlobalsPrefix) {
|
||||
cli.Println(color.YellowString("Warning: Unknown local config option '%s'. Use `dolt config --local --unset %s` to remove.", name, name))
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user