(cliHost: CLIHost, output: Log, files: string[], prefix: string)
| 305 | } |
| 306 | |
| 307 | async function checkForPersistedFile(cliHost: CLIHost, output: Log, files: string[], prefix: string) { |
| 308 | const file = files.find((f) => f.indexOf(prefix) > -1); |
| 309 | if (file) { |
| 310 | const composeFileExists = await cliHost.isFile(file); |
| 311 | |
| 312 | if (composeFileExists) { |
| 313 | output.write(`Restoring ${file} from persisted storage`); |
| 314 | return { |
| 315 | foundLabel: true, |
| 316 | fileExists: true, |
| 317 | file |
| 318 | }; |
| 319 | } else { |
| 320 | output.write(`Expected ${file} to exist, but it did not`, LogLevel.Error); |
| 321 | return { |
| 322 | foundLabel: true, |
| 323 | fileExists: false, |
| 324 | file |
| 325 | }; |
| 326 | } |
| 327 | } else { |
| 328 | output.write(`Expected to find a docker-compose file prefixed with ${prefix}, but did not.`, LogLevel.Error); |
| 329 | } |
| 330 | return { |
| 331 | foundLabel: false |
| 332 | }; |
| 333 | } |
| 334 | |
| 335 | async function startContainer(params: DockerResolverParameters, buildParams: DockerCLIParameters, configWithRaw: SubstitutedConfig<DevContainerFromDockerComposeConfig>, projectName: string, composeFiles: string[], envFile: string | undefined, composeConfig: any, container: ContainerDetails | undefined, idLabels: string[], additionalFeatures: Record<string, string | boolean | Record<string, string | boolean>>) { |
| 336 | const { common } = params; |
no test coverage detected