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

dolt init doesn't fail when a non-option argument is provided #4771

Closed
abitrolly opened this issue Nov 12, 2022 · 5 comments · Fixed by #4815
Closed

dolt init doesn't fail when a non-option argument is provided #4771

abitrolly opened this issue Nov 12, 2022 · 5 comments · Fixed by #4815
Assignees
Labels
bug Something isn't working cli

Comments

@abitrolly
Copy link

$  dolt init sdfsdfs --dfdsf
error: unknown option `dfdsf'
$  dolt init sdfsdfs        
This directory has already been initialized.
$ ls -l 
total 0
@timsehn timsehn added the cli label Nov 12, 2022
@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 12, 2022

You actually have a dolt repo there. That argument is ignored. We'll discuss as a team and see if this is worth fixing.

@abitrolly
Copy link
Author

abitrolly commented Nov 12, 2022

Without repo it's the same. The argument is not used, and dolt doesn't fail.

➜  xxx ls -la
total 0
drwxr-xr-x.  2 anatoli anatoli  40 Nov 12 20:55 .
drwxrwxrwt. 23 root    root    980 Nov 12 20:56 ..                                                                                                                   /0,0s
➜  xxx dolt init whatever --name=n --email=e
Successfully initialized dolt data repository.                                                                                                                       /0,1s
➜  xxx ls -la
total 0
drwxr-xr-x.  3 anatoli anatoli   60 Nov 12 20:56 .
drwxrwxrwt. 23 root    root    1000 Nov 12 20:56 ..
drwxr-xr-x.  4 anatoli anatoli  120 Nov 12 20:56 .dolt

@timsehn timsehn added the bug Something isn't working label Nov 14, 2022
@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 14, 2022

After some discussion, we agree it should fail. Will resolve this week.

@abitrolly
Copy link
Author

Have you considered creating the dir from the argument like git does?

@timsehn
Copy link
Sponsor Contributor

timsehn commented Nov 16, 2022

I think we'll match the git specification as is our custom :-)

@jennifersp jennifersp linked a pull request Nov 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants