Returns absolute path
(args []string)
| 119 | |
| 120 | // Returns absolute path |
| 121 | func 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 | |
| 139 | func getDeploymentBytes(configPath string) (map[string][]byte, error) { |
| 140 | configBytes, err := files.ReadFileBytes(configPath) |
no test coverage detected