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, args):
"""
Runs this kas plugin
"""
if args.cmd != 'shell':
return False
ctx = create_global_context(args)
ctx.config = Config(args.config, None, None)
macro = Macro()
# Prepare
if not args.keep_config_unchanged:
macro.add(SetupDir())
if 'SSH_PRIVATE_KEY' in os.environ:
macro.add(SetupSSHAgent())
ctx.keep_config = args.keep_config_unchanged
macro.add(InitSetupRepos())
repo_loop = Loop('repo_setup_loop')
def run(self, args):
"""
Executes the build command of the kas plugin.
"""
if args.cmd != 'build':
return False
ctx = create_global_context(args)
ctx.config = Config(args.config, args.target, args.task)
macro = Macro()
# Prepare
macro.add(SetupDir())
if 'SSH_PRIVATE_KEY' in os.environ:
macro.add(SetupSSHAgent())
macro.add(InitSetupRepos())
repo_loop = Loop('repo_setup_loop')
repo_loop.add(SetupReposStep())
macro.add(repo_loop)