fix: error when --remote flag used with repo argument#12375
fix: error when --remote flag used with repo argument#12375
Conversation
When a repository argument is provided to `gh repo fork`, the command operates independently of the current local repository. Using --remote in this context is incompatible because there's no local repository to add the remote to. This change returns an explicit error when these flags are combined, providing clear feedback instead of silently ignoring the --remote flag. Fixes cli#2722 Signed-off-by: majiayu000 <1835304752@qq.com>
|
Thank you for your pull request! 🎉 This PR appears to fix the following issues that are not labeled with
help wanted
As outlined in our Contributing Guidelines, we expect that PRs are only created for issues that have been labeled While we appreciate your initiative, please note that:
What happens next:
Thank you for your understanding and contribution to the project! 🙏 This comment was automatically generated by cliAutomation. |
There was a problem hiding this comment.
Thanks for the fix on this old issue. I think just error'ing out to be clear about what is supported is a good first step here. If someone has a use-case to support --remote here in the future, I think we should tackle that in a new issue.
Summary
Return an explicit error when
--remoteflag is used with a repository argument ingh repo fork.When a repository argument is provided, the command operates independently of the current local repository. Using
--remotein this context is incompatible because there is no local repository to add the remote to.Before this fix, the
--remoteflag was silently ignored. Now it returns:Fixes #2722