diff --git a/client/config.go b/client/config.go index e901b7296ad49ffa71d86496685331f8f714e65f..209d609c3f9b8195aa6ffb59dc9215ac6a615288 100644 --- a/client/config.go +++ b/client/config.go @@ -28,6 +28,7 @@ func setDefaults() { viper.SetDefault("validateTLSCertificate", true) } +// Expand ~ and ~user for a given path. func ExpandTilde(path string) string { re := regexp.MustCompile("^~([^/]*)(/.*)") if m := re.FindStringSubmatch(path); len(m) > 0 {