Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init_fbs(self, platform_name=None):
if platform_name is not None:
runtime_state.restore(platform_name, None, None)
fbs.init(self._project_dir)
def tearDown(self):
def main(project_dir=None):
"""
This function is executed when you run `fbs ...` on the command line. You
can call this function from your own build script to run fbs as if it were
called via the above command. For an example, see:
https://build-system.fman.io/manual/#custom-commands
"""
if project_dir is None:
project_dir = getcwd()
try:
fbs.init(project_dir)
# Load built-in commands:
from fbs import builtin_commands
from fbs.builtin_commands import _docker
from fbs.builtin_commands import _gpg
from fbs.builtin_commands import _account
from fbs.builtin_commands import _licensing
fn, args = _parse_cmdline()
fn(*args)
except KeyboardInterrupt:
print('')
sys.exit(-1)
except FbsError as e:
# Don't print a stack trace for FbsErrors, just their message:
_LOG.error(str(e))
sys.exit(-1)