nerves-web-kiosk / kiosk_system_rpi3

Nerves QtWebEngine Kiosk system for Raspberry Pi 3
Apache License 2.0
67 stars 25 forks source link

No error handling when determining NERVES_FW_VCS_IDENTIFIER #18

Closed nmoskopp closed 6 years ago

nmoskopp commented 6 years ago

In kiosk_system_rpi3/mix.exs, the line :os.cmd('git rev-parse HEAD') does not check the return code, possibly setting the environment variable NERVES_FW_VCS_IDENTIFIER to the value fatal: Not a git repository (or any of the parent directories): .git if executed outside a Git repository.

I think this line should use System.cmd("git", ["rev-parse", "HEAD"]) instead, which returns {"", 128} in this specific error case.

mobileoverlord commented 6 years ago

Yeah, I knew this would eventually come to bite me. I think we could just omit this and let circle bake it into the releases.

mobileoverlord commented 6 years ago

this was in there when the repo was not on hex yet, I think I am just going to remove it.

mobileoverlord commented 6 years ago

Fixed in 1.0.0-rc.0