MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / resolve_workflow_path

Function resolve_workflow_path

app/workflow/workflow.cpp:148–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

run_batch_inputs_stepFunction · 0.85
run_convert_audio_stepFunction · 0.85
run_model_step_implFunction · 0.85
run_chunked_model_stepFunction · 0.85
run_mix_audio_stepFunction · 0.85
run_model_step_foreachFunction · 0.85
run_json_workflowFunction · 0.85

Calls 2

expand_valueFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected