elastic / elastic/docs-builder
`docs-builder mv` fails to move directories completely
- Dominant language
- C#
- Stars
- 24
- Forks
- 44
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
### Describe the bug
The `docs-builder mv` command does not work reliably when moving directories. It only moves some files, leaves others behind, doesn't handle images in subdirectories, and sometimes updates internal links with incorrect relative paths. This requires additional steps to complete the move operation.
### Expected behavior
- Single `docs-builder mv` command should move entire directory with all files and subdirectories
- All internal links should be updated correctly to new relative paths
- Source directory should be completely cleaned up after successful move
- Images and other assets in subdirectories should be moved automatically
### Steps to reproduce
1. Try to move the existing directory in `docs-content` repo
```bash
docs-builder mv extend/contribute/api-docs contribute-docs/api-docs
```
2. Observe the issues:
- Check `ls extend/contribute/api-docs/` - some files remain in source
- Check `ls contribute-docs/api-docs/images/` - images directory not moved
- Check moved files for broken links like `../../extend/contribute/api-docs/workflows.md` instead of `./workflows.md`
- Check for links like `./../../extend/contribute/api-docs/guidelines.md` instead of `./guidelines.md`
### Tooling
- [x] docs-builder
- [ ] migration tooling
- [ ] I'm not sure
Contributor guide
Assessment
This issue has not been assessed yet.