'Execute a command in a shell.  If the value of initial_download is True, the recipe steps will
be filtered and returned and the installation directory (i.e., dir) will be defined and returned.
If we\'re not in the initial download stage, these actions will not occur, and None values will
be returned for them.'

def execute_step(self, tool_dependency, package_name, actions, action_dict, filtered_actions, env_file_builder, install_environment, work_dir, current_dir=None, initial_download=False):

    if initial_download:
        dir = package_name
        filtered_actions = actions[1:]
        cmd = action_dict['command']
    else:
        cmd = install_environment.build_command(action_dict['command'])
    with settings(warn_only=True):
        install_environment.handle_command(tool_dependency=tool_dependency, cmd=cmd, return_output=False, job_name=package_name)
        if initial_download:
            return (tool_dependency, filtered_actions, dir)
        return (tool_dependency, None, None)
