qri-io/qri_install

bug: if the `webapp` or `electron` folder already exists, `qri_build` will fail

Opened this issue · 1 comments

If I run a build command, and it works, then try to re-run the command without removing the folder that was previously generated, qri_build will build the the application, but then fail on the last step when it tries to move the contents into the qri_build folder.

INFO[0534] move: /Users/ramfox/frontend/dist/web -> ./webapp
ERRO[0534] building webapp: rename /Users/ramfox/frontend/dist/web ./webapp: file exists

We need to either give it permission to write over the folder, or remove the folder when it first starts the build process.

On this same topic, some building stuff happens in frontend, some in qri, some ends up in the working directory. For clarity sake, feels like this should be unified, or at least full paths should be used everywhere to abate confusion. (bug I'm working out right now comes from relative paths being used rather than absolute)