MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / EnsureConfigPath

Function EnsureConfigPath

pkg/config/config.go:90–100  ·  view source on GitHub ↗

EnsureConfigPath works out the config path, then creates the directory to make sure that it exists

()

Source from the content-addressed store, hash-verified

88
89// EnsureConfigPath works out the config path, then creates the directory to make sure that it exists
90func EnsureConfigPath() (string, error) {
91 configPath, err := getConfigPath()
92 if err != nil {
93 return "", err
94 }
95 err = os.MkdirAll(configPath, os.ModePerm)
96 if err != nil {
97 return "", err
98 }
99 return configPath, nil
100}
101
102// getConfigPath works out the directory where the config file should be saved and returns it.
103// does not modify the global viper

Callers 2

setRunFunction · 0.92
SetMethod · 0.85

Calls 1

getConfigPathFunction · 0.85

Tested by

no test coverage detected