Skip to content

Commit

Permalink
feat: skip dirs without env template
Browse files Browse the repository at this point in the history
  • Loading branch information
RostiMelk committed Jan 8, 2025
1 parent 55aff5d commit 439e85b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/@sanity/cli/src/util/remoteTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ export async function applyEnvVariables(
await access(join(root, file))
return file
}),
).catch(() => {
throw new Error('Could not find .env.template, .env.example or .env.local.example file')
})
).catch(() => undefined)

if (!templatePath) {
return // No template .env file found, skip
}

try {
const templateContent = await readFile(join(root, templatePath), 'utf8')
Expand Down

0 comments on commit 439e85b

Please sign in to comment.