Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def call_locate_command(self, command_name, platform):
command_args = (
[command_name, '--on', platform] if platform else [command_name])
result = self.runner.invoke(cli.locate, command_args)
return result