Skip to content

feat: add global --config flag to override netlify.toml location#8255

Open
sean-roberts wants to merge 1 commit into
mainfrom
claude/slack-session-5IUXx
Open

feat: add global --config flag to override netlify.toml location#8255
sean-roberts wants to merge 1 commit into
mainfrom
claude/slack-session-5IUXx

Conversation

@sean-roberts
Copy link
Copy Markdown
Contributor

The code in base-command.ts was already prepared to handle a --config flag (at line 627), but the option was never actually defined. This caused "unknown option '--config'" errors when users tried to specify a custom config file path.

This is useful when working in subdirectories where you want to ignore parent directory netlify.toml files and use a local config instead.

https://claude.ai/code/session_017b75UnpDTsU6M9dQhokQr1

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #<replace_with_issue_number>


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

The code in base-command.ts was already prepared to handle a --config
flag (at line 627), but the option was never actually defined. This
caused "unknown option '--config'" errors when users tried to specify
a custom config file path.

This is useful when working in subdirectories where you want to ignore
parent directory netlify.toml files and use a local config instead.

https://claude.ai/code/session_017b75UnpDTsU6M9dQhokQr1
@sean-roberts sean-roberts requested a review from a team as a code owner May 13, 2026 14:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1e7fcea5-2065-4ca4-96ed-99b343f6fe45

📥 Commits

Reviewing files that changed from the base of the PR and between 0a70cf4 and c17e696.

📒 Files selected for processing (1)
  • src/commands/base-command.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Users can now specify a custom Netlify configuration file path using the --config <path> CLI option. If not provided, the tool defaults to searching for netlify.toml in the current or parent directories.

Walkthrough

A single line is added to BaseCommand.createCommand() in the base command file, introducing a new global CLI option --config <path>. This option allows users to specify the path to the Netlify configuration file, with a default search pattern of netlify.toml in the current or parent directories. No other logic was changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a global --config flag to allow overriding the netlify.toml location, which matches the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining why the flag was added, what problem it solves, and its use case, despite including template boilerplate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/slack-session-5IUXx

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

📊 Benchmark results

Comparing with 0a70cf4

  • Dependency count: 1,129 (no change)
  • Package size: 379 MB ⬆️ 0.00% increase vs. 0a70cf4
  • Number of ts-expect-error directives: 355 (no change)

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.

2 participants