rhargreaves / mega-drive-midi-interface

Control the Sega Mega Drive's Yamaha YM2612 and PSG with MIDI
GNU General Public License v3.0
95 stars 8 forks source link

fix(docker-make): create out/ folder before building as root #33

Closed uZer closed 1 year ago

uZer commented 1 year ago

Hi! Thanks for this great project :)

This is just a very small PR to prevent a permission denied error occuring when running docker-make as a non-root user.

./docker-make: line 6: out/version.txt: Permission denied

The version.txt file is populated outside the container in the docker-make script running with our current user which may not be root. Since the out/ directory is created inside the container with USER root / UID 0, it will by prevent other users to write in this directory because of the default umask in the container.

A proper way to fix this would have been to run the container with current system user, but there is a less intrusive, super simple fix for this: create the out/ folder outside the container before populating it.

Sorry for this very anecdotal PR, let's say it was a way to say "hello" :') Now it's done, can't wait to try this awesome project of yours!

Cheers

rhargreaves commented 1 year ago

Thanks for your kind words and contribution! I tend to only develop this on macOS so seem to escape the root permissions issue. However, I can see this would cause problems on Linux so happy to merge. Enjoy :)