| 146 | if (std::isalnum(uch) == 0 && ch != '-' && ch != '_') { |
| 147 | ch = '_'; |
| 148 | } |
| 149 | } |
| 150 | return value; |
| 151 | } |
| 152 | |
| 153 | std::filesystem::path resolve_workflow_path(const std::string & value, const WorkflowContext & context) { |
| 154 | std::filesystem::path path(expand_value(value, context)); |
| 155 | if (path.is_absolute()) { |
| 156 | return path; |
| 157 | } |
| 158 | if (value.find("${out_dir}") != std::string::npos || |
| 159 | value.find("${workflow_dir}") != std::string::npos || |
| 160 | value.find("${") != std::string::npos) { |
| 161 | throw std::runtime_error( |
| 162 | "workflow path inputs expanded from placeholders must be absolute: " + value + |
| 163 | " -> " + path.string()); |
| 164 | } |
no test coverage detected