Cookiecutter fails on repo creation
felciano opened this issue · comments
I'm trying to use this to create a new CLI tool. After filling out the webform, a new repo is created as expected, but it only contains a README and the .github/workflows
directory. The desired template files (tests
directory, the app directory with the cli.py
starter file, the LICENSE
file, etc) are not created, so it looks like maybe cookiecutter
isn't being run as expected?
Under the Actions tab the "Initial commit" action shows a red X with "This workflow failed to run", and the run log shows an error at the "Rebuild contents using cookiecutter" step:
mv: cannot move 'plextool/plextool' to './plextool': Directory not empty
I tried rerunning the job and it fails at the same place. I'm not very familiar with GitHub actions -- any suggestions on how to debug further?
Definitely sounds like a bug! Will investigate shortly.
Strange: I can't seem to replicate this, my test run here worked as it should: https://github.com/simonw/test-click-app-bug/runs/4599313389?check_suite_focus=true (now deleted)
Here's the code that would be causing this - specifically line 59:
click-app-template-repository/.github/workflows/cookiecutter.yml
Lines 48 to 59 in e862550
I'm going to change the workflow to do its thing in /tmp
I tested this new version and it worked for me - @felciano could you try and report back if it works?
Yes, that seems to have solved the issue. Thank you!
I'm going to apply this pattern to my other two repos as well.