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

Build fails when temporary folder already exists #243

Closed
matthewp opened this issue Mar 30, 2016 · 1 comment · Fixed by #245
Closed

Build fails when temporary folder already exists #243

matthewp opened this issue Mar 30, 2016 · 1 comment · Fixed by #245
Assignees
Labels
Milestone

Comments

@matthewp
Copy link
Contributor

Don't have steps to reproduce yet, happens from time to time.

Error: EEXIST, mkdir '/home/bitovi/build/donejs.com/node_modules/documentjs/site/static/build/18ac2d2dd00e16cff967eb1a44738a2d'
@matthewp matthewp self-assigned this Apr 4, 2016
@matthewp matthewp added this to the 0.4.4 milestone Apr 4, 2016
@matthewp matthewp added bug and removed enhancement labels Apr 5, 2016
@matthewp
Copy link
Contributor Author

matthewp commented Apr 5, 2016

Created this script to recreate it in the donejs project:

#!/bin/bash

CODE=1

while [ $CODE -gt 0 ]
do
  rm -rf node_modules/documentjs/site/static
  rm -rf node_modules/documentjs/site/templates
  npm run document &> out
  cat out | grep EEXIST

  CODE=$?
  echo $CODE
done

matthewp added a commit that referenced this issue Apr 5, 2016
This fixes #243

The cause of the bug was that we were making the dist and build folders
at the same time that we were trying to copy the static.css into the
build folder. So the error would occur when things happened in this
order:

1. dist folder created
2. stat to check if dist/bundles/static.css exists (it won't)
3. copy the default static folder into the build folder
4. build folder is created

Error occurs when 3 occurs before 4.

Restructured the code so that we make the folders before trying the copy
procedure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant