|
1
|
import path from "path" |
|
2
|
|
|
3
|
export function getPathForEnv(...pathSegments: string[]): string { |
|
4
|
const isCloudflare = !!process.env.SPECS_R2_BASE_URL |
|
5
|
|
|
6
|
if (isCloudflare) { |
|
7
|
return pathSegments.join("/") |
|
8
|
} |
|
9
|
|
|
10
|
return path.join(...pathSegments) |
|
11
|
} |