Skip to content

Commit

Permalink
Always locate site-configs from cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxachun committed Oct 18, 2024
1 parent e2eb826 commit c988793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rotten-experts-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cli": minor
---

The `inject-site-configs` command locates the site-config-file argument relative to the current directory
2 changes: 1 addition & 1 deletion packages/cli/src/commands/site-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const injectSiteConfigsCommand = new Command("inject-site-configs")
.option("-d --dotenv", "dotenv compatibility") // https://github.com/motdotla/dotenv/issues/521#issuecomment-999016064
.option("-f, --site-config-file <file>", "Path to ts-file which provides a default export with (env: string) => SiteConfig[]")
.action(async (options) => {
const configFile = options.siteConfigFile ?? `${process.cwd()}/site-configs.ts`;
const configFile = `${process.cwd()}/${options.siteConfigFile || "site-configs.ts"}`;
const getSiteConfigs: (env: string) => BaseSiteConfig[] = (await import(configFile)).default;

console.log(`inject-site-configs: Replace site-configs in ${options.inFile}`);
Expand Down

0 comments on commit c988793

Please sign in to comment.