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

Directory hashing fails on symlinks #38

Closed
zwade opened this issue Feb 26, 2022 · 2 comments
Closed

Directory hashing fails on symlinks #38

zwade opened this issue Feb 26, 2022 · 2 comments

Comments

@zwade
Copy link

zwade commented Feb 26, 2022

Specifically, if the directory contains a symbolic link to another directory, then hashing will get confused and say (e.g.)

cmgr: [WARN:  could not hash source files: read /Users/zacharywade/Documents/work/pico/2022/react-tests/node_modules/live-art-client: is a directory]

(As you might be able to guess from the path, this is a problem for yarn projects which always put symlinks to workspaces in the node_modules directory)

@jrolli
Copy link
Contributor

jrolli commented Feb 26, 2022

Thanks for the report. Can you include more details on the structure of the challenge directory that this failed on? I'm guessing that problem.md is located in ..../react-tests/ but I want to confirm before I look into the best way to gracefully handle this.

@zwade
Copy link
Author

zwade commented Feb 28, 2022

Yeah! Thanks for looking into this, here's a pretty minimal POC

mkdir poc && cd poc

mkdir folder
touch folder/file1
ln -s folder file2

cat > problem.md <<EOF
# Test
- namespace: cmgr/test
- type: custom
EOF

echo "FROM empty" > Dockerfile

cmgr update .

@jrolli jrolli closed this as completed in 64018ce Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants