Skip to content

Conversation

@justinmchase
Copy link
Collaborator

Proposed changes

For some reason the -c,--config options are not working as expected.

All of the other options when you map them with an alias such as -n,--name when the are passed to the command function they are on the fullname property of the arguments such as { name }.

Config appears to be an exception to the rule and is always applied as { c } for an unknown reason.

This change models the c?: string field on the args and then normalizes it where it is used

psuedo-logic

// old
const configPath = config;

// new
const configPath = config ?? c;

Types of changes

What types of changes does your code introduce? Put an x in the boxes that
apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.

  • I have read the
    CONTRIBUTING
    doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc...

@github-actions github-actions bot added the bug Something isn't working label Aug 29, 2025
@justinmchase justinmchase requested a review from Copilot August 29, 2025 17:53
@justinmchase justinmchase self-assigned this Aug 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the -c/--config command-line options were not working correctly due to the argument being passed as c instead of config in the context object. The fix adds support for both the short form (c) and long form (config) to ensure the custom config path option works as expected.

  • Adds fallback logic to use c when config is not provided
  • Updates the IContext interface to include the c property
  • Adds comprehensive test coverage for the custom config functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/context.ts Adds c?: string property to IContext interface with explanatory comment
src/hooks/post.ts Implements fallback logic config ?? c for config path resolution
src/hooks/post.test.ts Adds new test case and improves existing test structure with proper cleanup
test/node/.github/version-test.yml Adds test fixture file for custom config testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@justinmchase justinmchase merged commit a9d2572 into main Aug 29, 2025
6 checks passed
@justinmchase justinmchase deleted the fix/custom-config-path branch August 29, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants