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

Error when Cloning Meta Repository with Nested Directories #337

Open
ShethRuchi opened this issue Jun 20, 2024 · 0 comments
Open

Error when Cloning Meta Repository with Nested Directories #337

ShethRuchi opened this issue Jun 20, 2024 · 0 comments
Labels

Comments

@ShethRuchi
Copy link

🐛 Bug Report

We are experiencing an issue when attempting to clone a meta repository that contains nested directories. The cloning process fails with an ENOENT error, indicating that the specified directory does not exist. This issue occurs when the meta repository includes deeply nested project paths.

To Reproduce

Create a meta repository with a structure including nested directories.
projects
|
|--Proejct1
|----|---repo1
|----|---repo2
|----|---repo3
|--Proejct2
|----|---repo4
|----|---repo5
|----|---repo6

Add a .meta file with nested project paths. For example

{
  "projects": {
    "project1/repo1": "git repo URL",
    "project1/repo2": "git repo URL",
    "project1/repo3": "git repo URL",
    "project2/repo4": "git repo URL",
    "project2/repo5": "git repo URL",
    "project2/repo6": "git repo url",
  }
}

Try to clone the meta repository using the command:
meta git clone
inside directory ~/Development/work/

Error

warn: The current directory is not a meta repo:
  ~/Development/work/projects
And none of your ancestors are meta repos, either.
node:internal/bootstrap/switches/does_own_process_state:124
  rawMethods.chdir(directory);
             ^
Error: ENOENT: no such file or directory, chdir '/home/sheth/Development/work//projects' -> '/home/sheth/Development/work//projects/projects'
    at process.wrappedChdir [as chdir] (node:internal/bootstrap/switches/does_own_process_state:124:14)
    at /home/sheth/.nvm/versions/node/v20.8.0/lib/node_modules/meta/node_modules/meta-git/bin/meta-git-clone:28:11
    at /home/sheth/.nvm/versions/node/v20.8.0/lib/node_modules/meta/node_modules/meta-exec/index.js:104:22
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'chdir',
  path: '/home/sheth/Development/work/projects',
  dest: '/home/sheth/Development/work/projects/projects'
}

Expected behavior

The meta repository and its nested projects should be cloned without errors.
dest path should be /home/sheth/Development/work/projects it should not create projects directory inside projects directory

@ShethRuchi ShethRuchi added the bug label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant