MCPcopy Index your code
hub / github.com/cortexlabs/cortex / getConfigPath

Function getConfigPath

cli/cmd/deploy.go:121–137  ·  view source on GitHub ↗

Returns absolute path

(args []string)

Source from the content-addressed store, hash-verified

119
120// Returns absolute path
121func getConfigPath(args []string) string {
122 var configPath string
123
124 if len(args) == 0 {
125 configPath = "cortex.yaml"
126 if !files.IsFile(configPath) {
127 exit.Error(ErrorCortexYAMLNotFound())
128 }
129 } else {
130 configPath = args[0]
131 if err := files.CheckFile(configPath); err != nil {
132 exit.Error(err)
133 }
134 }
135
136 return files.RelToAbsPath(configPath, _cwd)
137}
138
139func getDeploymentBytes(configPath string) (map[string][]byte, error) {
140 configBytes, err := files.ReadFileBytes(configPath)

Callers 1

deploy.goFile · 0.85

Calls 5

IsFileFunction · 0.92
ErrorFunction · 0.92
CheckFileFunction · 0.92
RelToAbsPathFunction · 0.92
ErrorCortexYAMLNotFoundFunction · 0.85

Tested by

no test coverage detected