Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(self, command, variables=[], board=None, packages=[]):
"""Executes scons for building"""
# -- Check for the SConstruct file
if not isfile(util.safe_join(util.get_project_dir(), 'SConstruct')):
variables += ['-f']
variables += [util.safe_join(
util.get_folder('resources'), 'SConstruct')]
else:
click.secho('Info: use custom SConstruct file')
# -- Resolve packages
if self.profile.check_exe_default():
# Run on `default` config mode
if not util.resolve_packages(
packages,
self.profile.packages,
self.resources.distribution.get('packages')
):
# Exit if a package is not installed
raise Exception