MCPcopy
hub / github.com/promptfoo/promptfoo / getResolvedRelativePath

Function getResolvedRelativePath

src/util/file.ts:241–249  ·  view source on GitHub ↗
(filePath: string, isCloudConfig?: boolean)

Source from the content-addressed store, hash-verified

239 * @returns The resolved absolute file path.
240 */
241export function getResolvedRelativePath(filePath: string, isCloudConfig?: boolean): string {
242 // If it's already an absolute path, or not a cloud config, return it as is
243 if (path.isAbsolute(filePath) || !isCloudConfig) {
244 return filePath;
245 }
246
247 // Join the basePath and filePath to get the resolved path
248 return path.join(process.cwd(), filePath);
249}
250
251/**
252 * Recursively loads external file references from a configuration object.

Callers 2

file.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…