diff --git a/src/micromamba/pickMicromambaEnvironmentFile.ts b/src/micromamba/pickMicromambaEnvironmentFile.ts index eea88fc..1f250d6 100644 --- a/src/micromamba/pickMicromambaEnvironmentFile.ts +++ b/src/micromamba/pickMicromambaEnvironmentFile.ts @@ -111,7 +111,11 @@ export const readMicromambaEnvironmentFile = async ( const filePath = join(extContext.workspaceDir, fileName) try { const contentYaml = await fs.promises.readFile(filePath, 'utf8') - const content = YAML.parse(contentYaml) as MicromambaEnvironmentFileContent + const rawContent = YAML.parse(contentYaml) as MicromambaEnvironmentFileContent + const content = rawContent.name ? rawContent : { + ...rawContent, + name: 'default' + } return { content, fileName, filePath } } catch (ignore) { return undefined