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

[FEATURE] allow choosing the clone-target folder in mcdev join #1343

Open
1 of 3 tasks
JoernBerkefeld opened this issue May 23, 2024 · 0 comments
Open
1 of 3 tasks

[FEATURE] allow choosing the clone-target folder in mcdev join #1343

JoernBerkefeld opened this issue May 23, 2024 · 0 comments
Labels
c/INIT COMPONENT e/IDE EPIC enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" NEW not yet analyzed new issues get this label
Milestone

Comments

@JoernBerkefeld
Copy link
Contributor

currently we don't pass in a parameter for the target directory when running git clone and it used to be complicated to clone into the "current" directory.

but as noted here, that's actually quite easy now:

git clone git@github.com:user/my-project.git .

The "dot" makes all the difference.

Going forward, I would add 2 questions to mcdev join:

  1. "Which directory should we create your project in?"
  • "C:\repos\my-project" (current directory + git repo name)
  • "C:\repos" (current directory)
  • "C:\repos<your custom subfolder name>" (allows you to enter a folder name

Option 2 would need to be deactivated if that folder is not empty (see isDirEmpty() below).

  1. (if option 3 / custom was selected) How would you like to call your subfolder?
  • (error on slash/backslash, only allow a-Z, 0-9, -, _)
function isDirEmpty(path) {
    return fs.readdirSync(path).length === 0;
}
@JoernBerkefeld JoernBerkefeld added enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" e/IDE EPIC NEW not yet analyzed new issues get this label c/INIT COMPONENT labels May 23, 2024
@JoernBerkefeld JoernBerkefeld added this to the 7.2.0 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/INIT COMPONENT e/IDE EPIC enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" NEW not yet analyzed new issues get this label
Projects
None yet
Development

No branches or pull requests

1 participant