ResolveScanDir returns the scan directory from positional arg or --task-dir flag. Positional arg takes precedence for backward compatibility.
(args []string)
| 258 | // ResolveScanDir returns the scan directory from positional arg or --task-dir flag. |
| 259 | // Positional arg takes precedence for backward compatibility. |
| 260 | func ResolveScanDir(args []string) string { |
| 261 | if len(args) > 0 { |
| 262 | return args[0] |
| 263 | } |
| 264 | return GetGlobalFlags().TaskDir |
| 265 | } |
| 266 | |
| 267 | // resolveProjectDir looks up a project in the global registry and returns its task directory. |
| 268 | // It also reloads viper config from the project's .taskmd.yaml. |