Bug
The setup command reports copying .env files but silently skips the root-level .env file, so nothing actually gets copied.
Steps to reproduce
- Have a project with a single
.env file at the root: ~/.enman/projects/<project>/.env
- Run
enman setup <project> <target-dir>
- Output says "Copied 1 .env file(s)" but no file appears in the target directory.
Root cause
In bin/setup.sh lines 42-49, the loop skips any file whose relative path equals .env:
find "$SOURCE_DIR" -name ".env" -type f 2>/dev/null | while read -r env_file; do
rel_path="${env_file#$SOURCE_DIR/}"
# Skip the script itself if it's named .env
if [ "$rel_path" = ".env" ]; then
continue
fi
When the only .env file is at the project root, rel_path resolves to .env, matching the skip condition. The file is silently skipped.
Meanwhile, the summary on line 66 counts files found by find (which is 1), not files actually copied — so the output is misleading.
Suggested fix
Remove the skip condition on lines 47-49. A root-level .env is a valid file to copy. If the intent was to avoid copying some metadata file, use a different name for it.
Bug
The
setupcommand reports copying .env files but silently skips the root-level.envfile, so nothing actually gets copied.Steps to reproduce
.envfile at the root:~/.enman/projects/<project>/.envenman setup <project> <target-dir>Root cause
In
bin/setup.shlines 42-49, the loop skips any file whose relative path equals.env:When the only
.envfile is at the project root,rel_pathresolves to.env, matching the skip condition. The file is silently skipped.Meanwhile, the summary on line 66 counts files found by
find(which is 1), not files actually copied — so the output is misleading.Suggested fix
Remove the skip condition on lines 47-49. A root-level
.envis a valid file to copy. If the intent was to avoid copying some metadata file, use a different name for it.