Migrate ParseAddress to shared-secure-libs (#1313)
This commit is contained in:
1 parent
8c63ede9cc
commit
9c945b7021
6 files changed
+24
-56
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package dev
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"runtime"
|
||||
@@ -19,6 +20,7 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/target"
|
||||
"github.com/hashicorp/boundary/internal/types/scope"
|
||||
"github.com/hashicorp/boundary/sdk/strutil"
|
||||
"github.com/hashicorp/shared-secure-libs/configutil"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
@@ -483,8 +485,8 @@ func (c *Command) Run(args []string) int {
|
||||
c.ShutdownFuncs = append(c.ShutdownFuncs, c.DestroyDevDatabase)
|
||||
}
|
||||
default:
|
||||
c.DatabaseUrl, err = config.ParseAddress(c.flagDatabaseUrl)
|
||||
if err != nil && err != config.ErrNotAUrl {
|
||||
c.DatabaseUrl, err = configutil.ParsePath(c.flagDatabaseUrl)
|
||||
if err != nil && !errors.Is(err, configutil.ErrNotAUrl) {
|
||||
c.UI.Error(fmt.Errorf("Error parsing database url: %w", err).Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user