export function stripCwdPrefix(filePath, cwd) {
    if (!cwd || !filePath) {
        return filePath;
    }
    const normalizedCwd = cwd.replace(/\\/g, "/").replace(/\/+$/, "");
    const normalizedPath = filePath.replace(/\\/g, "/");
    const prefix = `${normalizedCwd}/`;
    if (normalizedPath.startsWith(prefix)) {
        return normalizedPath.slice(prefix.length);
    }
    if (normalizedPath === normalizedCwd) {
        return ".";
    }
    return filePath;
}
//# sourceMappingURL=path-utils.js.map