When I run the meta project import command, I often forget to add both dest and repoURL params. Instead I just add one param (usually the repo URL). Meta then proceeds to modify the .gitignore file, then tries to clone the repo but fails, hence not modifying the .meta file. The .gitignore file now contains the git URL, which is not correct.
To Reproduce
Example:
> meta project import git@github.com:eddex/some-repo.git
{ repoUrl: undefined, dest: 'git@github.com:eddex\\some-repo.git' }
~\work\meta-repo:
fatal: repository 'undefined' does not exist
~\work\meta-repo: command 'git clone undefined git@github.com:eddex\some-repo.git' exited with error: Error: Command failed: git clone undefined git@github.com:eddex\some-repo.git
Appending to ~\work\meta-repo\.gitignore
Updating "projects" in ~\work\meta-repo\.meta
✓ Project imported: git@github.com:eddex\some-repo.git
The only modified file after this command is the .gitignore, meta adds the dest param (which in this case is the git URL):
+/git@github.com:eddex\some-repo.git/
Expected behavior
If only one param is detected (one of them is null/undefined), the command should be aborted and no files should be modified.
Alternatively, it would be great to allow only passing the repoURL and automatically parsing the repo name from it.
🐛 Bug Report
When I run the
meta project import
command, I often forget to add bothdest
andrepoURL
params. Instead I just add one param (usually the repo URL). Meta then proceeds to modify the.gitignore
file, then tries to clone the repo but fails, hence not modifying the.meta
file. The.gitignore
file now contains the git URL, which is not correct.To Reproduce
Example:
The only modified file after this command is the
.gitignore
, meta adds thedest
param (which in this case is the git URL):Expected behavior
If only one param is detected (one of them is null/undefined), the command should be aborted and no files should be modified.
Alternatively, it would be great to allow only passing the
repoURL
and automatically parsing the repo name from it.