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

Change the default for the directory option #20

Closed
hussainweb opened this issue Aug 3, 2020 · 6 comments
Closed

Change the default for the directory option #20

hussainweb opened this issue Aug 3, 2020 · 6 comments

Comments

@hussainweb
Copy link
Member

The directory option is confusing and prone to errors. It might be better to just ensure that the current directory is empty and if it isn't, throw an error asking the user to create a new directory and run the command there.

Alternatively, we can keep the --directory option and make it optional. If it is an empty string (or .), we check if the current directory is empty.

Neither of the above breaks the current workflow significantly. The current workflow also gives an error if the directory exists.

@mehulshah1506
Copy link

How about creating a directory with a specific name, if the --directory not provided. Just like what Git does.

@hussainweb
Copy link
Member Author

@mehulshah1506, can you clarify what git does? I'm not sure which command you're referring to. For example, git init initializes a repo in the current directory.

Also, currently, if --directory is not provided, it defaults to drupal. That's the confusing part. If someone doesn't provide this option, it's not intuitive that they have to look for a directory called drupal.

@mehulshah1506
Copy link

Apologies for not providing enough details.

I was referring to git clone <repo> <directory> where <directory> is optional.

Once properly initialized, display a message where it has been initialized.

@hussainweb
Copy link
Member Author

@mehulshah1506, I see what you mean and it makes sense. In our case, right now, we have init-drupal vendor/site. We could default the directory to site.

@hussainweb
Copy link
Member Author

With that in mind, I think #20 is still a step in the right direction. I'll merge that and work on the change as per my last comment.

@hussainweb hussainweb reopened this Aug 5, 2020
@hussainweb hussainweb changed the title Remove the directory option Change the default for the directory option Aug 5, 2020
@hussainweb
Copy link
Member Author

Fixed in #22.

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

No branches or pull requests

2 participants