Skip to content

[KDM-CLI-FIX-321] fix: return non-zero on config set errors - #321

Merged
utkarsh232005 merged 2 commits into
KDM-cli:mainfrom
Akanshagore:fix/config-set-exit-code-263
Sep 23, 2026
Merged

utkarsh232005 merged 2 commits into
KDM-cli:mainfrom
Akanshagore:fix/config-set-exit-code-263

Conversation

@Akanshagore

Copy link
Copy Markdown
Contributor

Summary

  • Set exit code to 1 when kdm config set fails.
  • Clarify that SMTP passwords must be provided through KDM_SMTP_PASSWORD.
  • Update the SMTP setup guide accordingly.

Testing

  • npm run build passes.
  • Verified that invalid config values report an error.

Fixes #263

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: QUIET

Plan: Advanced

Run ID: 8afb68ca-97fd-432f-9ba3-d8ad7acc4287

📥 Commits

Reviewing files that changed from the base of the PR and between a0e558e and 2ec0b77.

📒 Files selected for processing (1)
  • src/commands/config.ts

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

Parsing errors (2)
Validation error: Invalid input: expected string, received undefined at "reviews.path_instructions[3].path"; Invalid input: expected string, received undefined at "reviews.path_instructions[3].instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot changed the title fix: return non-zero on config set errors [KDM-CLI-FIX-321] fix: return non-zero on config set errors Sep 22, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@utkarsh232005 utkarsh232005 left a comment

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.

Looks good! The changes accurately address Issue #263:

  • Properly sets process.exitCode = 1 when an error is caught during kdm config set, ensuring CI/CD scripts fail as expected.
  • Updates the note in kdm config list (and the setup guide) to clarify that SMTP passwords must be supplied via KDM_SMTP_PASSWORD.

LGTM!

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@utkarsh232005
utkarsh232005 merged commit d2b587f into KDM-cli:main Sep 23, 2026
6 of 7 checks passed
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/commands/config.ts 60.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 'kdm config set' exits with status 0 on validation/runtime errors & misleading password docs

2 participants