MCPcopy Create free account
hub / github.com/Serverless-Devs/Serverless-Devs / getEnvFilePath

Function getEnvFilePath

src/utils/index.ts:256–266  ·  view source on GitHub ↗
(template: string)

Source from the content-addressed store, hash-verified

254}
255
256export 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}

Callers 6

getBasicInfoMethod · 0.90
startMethod · 0.90
startMethod · 0.90
startMethod · 0.90
startMethod · 0.90
startMethod · 0.90

Calls 1

startMethod · 0.45

Tested by

no test coverage detected