Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in postgraphile CLI parser for no --watch #1867

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

benjie
Copy link
Member

@benjie benjie commented Nov 22, 2023

Description

CLI flags override the config; so if you have watch: false in the config but run the CLI with postgraphile --watch then watch mode should be enabled. However because we had default: false in the config for the argument parser, we were overriding watch: true in the config with watch: false from the CLI.

Removing this default resolves the issue.

Issue raised by @TimoStolz via Discord: (sponsors only channel): https://discord.com/channels/489127045289476126/953710447087980654/1176875333560062145

Performance impact

None.

Security impact

None.

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

… force `watch: false` even if config sets `watch: true`.
Copy link

changeset-bot bot commented Nov 22, 2023

🦋 Changeset detected

Latest commit: 0048892

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
postgraphile Patch
pgl Patch
graphile Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjie benjie merged commit e28e9a0 into main Nov 22, 2023
24 checks passed
@benjie benjie deleted the no-default-in-cli branch November 22, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant