2024-04-11 12:46:13 -04:00
|
|
|
//go:build windows
|
|
|
|
|
|
|
|
package envs
|
|
|
|
|
|
|
|
import (
|
2024-06-27 16:36:45 -04:00
|
|
|
"os"
|
|
|
|
|
2024-04-11 12:46:13 -04:00
|
|
|
"golang.org/x/sys/windows/registry"
|
|
|
|
)
|
|
|
|
|
|
|
|
// interpolateString takes string s and performs environment variable interpolation/substitution on it.
|
|
|
|
func interpolateString(s string) (subbed string, err error) {
|
|
|
|
|
|
|
|
subbed, err = registry.ExpandString(os.ExpandEnv(s))
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|