Skip to content

cmd: refuse more than expected positional arguments #6154

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

Merged
merged 3 commits into from
May 29, 2025
Merged

Conversation

zhijian-pro
Copy link
Contributor

@zhijian-pro zhijian-pro commented May 28, 2025

close #6148

cmd/sync.go Outdated
@@ -448,6 +448,10 @@ func isS3PathType(endpoint string) bool {
}

func doSync(c *cli.Context) error {
if c.NArg() != 2 {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to move this into setup, and it could show a warning, rather than fatal

@davies davies changed the title fix: check if there are any unused parameters refuse more than expected positional arguments May 29, 2025
@jiefenghuang jiefenghuang changed the title refuse more than expected positional arguments cmd: refuse more than expected positional arguments May 29, 2025
@jiefenghuang jiefenghuang merged commit c5ad5bb into main May 29, 2025
36 checks passed
@jiefenghuang jiefenghuang deleted the check-sync-args branch May 29, 2025 08:14
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.

sync: The start-time/end-time parameters, %Y-%m-%d and %H:%M:%S are strengthened for parameter verification
3 participants