Skip to content

fix: honor Nitrogen config path - #1640

Closed
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/1554-nitrogen-config
Closed

fix: honor Nitrogen config path#1640
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/1554-nitrogen-config

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

  • pass the parsed --config value into Nitrogen before generation starts
  • centralize file-backed singleton initialization in NitroConfig.load() while preserving ./nitro.json as the default
  • add a black-box CLI regression and run Nitrogen CLI tests in CI

Breaking changes

None. Existing invocations still load ./nitro.json by default.

Verification

  • regression test failed before the fix: the CLI logged Loading nitro.json and reported that ./nitro.json did not exist despite a valid --config path
  • bun --cwd packages/nitrogen test (1/1)
  • bun --cwd packages/nitrogen typecheck
  • bun --cwd packages/nitrogen lint-ci
  • bun run build
  • bun typecheck
  • bun specs, with no generated diff
  • C++ and Swift format scripts passed through the Xcode toolchain
  • full lint-all reached Kotlin lint but the local machine does not have the ktlint executable; no Kotlin/native files are changed and CI will run that lane on the configured runner

AI assistance

Codex using GPT-5.6 Sol assisted with reproduction, implementation, tests, and review.

Fixes #1554

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@huytdps13400 is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

async (argv) => {
const basePath = argv.basePath
const outputDirectory = argv.out
NitroConfig.load(argv.config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not safe and just prone to races.

@mrousavy mrousavy closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nitrogen ignores the --config option

2 participants