(template: string)
| 254 | } |
| 255 | |
| 256 | export const getEnvFilePath = async (template: string): Promise<string> => { |
| 257 | try { |
| 258 | const spec = await new ParseSpec(template, { logger }).start(); |
| 259 | const envPath = utils.getAbsolutePath(get(spec, 'yaml.content.env', ENVIRONMENT_FILE_NAME)); |
| 260 | return envPath; |
| 261 | } catch (error) { |
| 262 | logger.debug('no template file, use default env.yaml'); |
| 263 | // fix: use default env.yaml |
| 264 | return utils.getAbsolutePath(ENVIRONMENT_FILE_NAME); |
| 265 | } |
| 266 | } |