Skip to content

Commit

Permalink
Add warning if enable_localSystem is true without setting default_loc…
Browse files Browse the repository at this point in the history
…ation_pkg
  • Loading branch information
marcoesters committed Jan 9, 2024
1 parent 0351787 commit de34610
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions constructor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ def main_build(dir_path, output_dir='.', platform=cc_platform,
)
if any(val != 'true' and val != 'false' for val in domains.values()):
sys.exit('Error: values for pkg_domains must be boolean.')
if (
str(domains.get('enable_localSystem', '')).lower() == 'true'
and not info.get('default_location_pkg')
):
logger.warning(
'enable_localSystem should not be enabled without setting'
' `default_location_pkg` to avoid installing directly '
' into the root directory.'
)
info['pkg_domains'] = domains
else:
info['pkg_domains'] = {
Expand Down

0 comments on commit de34610

Please sign in to comment.