(cloudApiFilePath)
| 76 | } |
| 77 | |
| 78 | const getCloudEnvironmentFileSource = async (cloudApiFilePath) => { |
| 79 | const fileContents = await fs.readFile(cloudApiFilePath, 'utf8') |
| 80 | |
| 81 | if (!fileContents.includes('process.env.CYPRESS_ENV_DEPENDENCIES')) { |
| 82 | throw new Error(`Expected to find CYPRESS_ENV_DEPENDENCIES in cloud api file`) |
| 83 | } |
| 84 | |
| 85 | if (process.env.CYPRESS_ENV_DEPENDENCIES) { |
| 86 | return fileContents.replace('process.env.CYPRESS_ENV_DEPENDENCIES', `'${process.env.CYPRESS_ENV_DEPENDENCIES}'`) |
| 87 | } |
| 88 | |
| 89 | return fileContents |
| 90 | } |
| 91 | |
| 92 | const validateCloudEnvironmentFile = async (cloudApiFilePath) => { |
| 93 | if (process.env.CYPRESS_ENV_DEPENDENCIES) { |
no test coverage detected