Skip to content
Snippets Groups Projects
  • Matthias Schiffer's avatar
    bd0133ad
    scripts/target_lib.lua: print a meaningful error message for missing site_code (#2094) · bd0133ad
    Matthias Schiffer authored
    site_code is evaluated early during config generation, so a site.conf
    without site_code would hit this assertion that just printed 'Assertion
    failed'. Add a proper error message to tell users what went wrong.
    
    The inner assert() is removed, as it should never be hit (as site.conf
    syntax will have already been validated when this script runs), and it
    doesn't add anything (even without the assert, the attempt to index a
    nil value would throw an error).
    scripts/target_lib.lua: print a meaningful error message for missing site_code (#2094)
    Matthias Schiffer authored
    site_code is evaluated early during config generation, so a site.conf
    without site_code would hit this assertion that just printed 'Assertion
    failed'. Add a proper error message to tell users what went wrong.
    
    The inner assert() is removed, as it should never be hit (as site.conf
    syntax will have already been validated when this script runs), and it
    doesn't add anything (even without the assert, the attempt to index a
    nil value would throw an error).