def resolve_interpreter_cmd(self) -> Optional[list[str]]:
        """
        Return a formatted command for the first specified interpreter that can be
        located.
        """
        for item in self._get_interpreter_config():
            executable = self._locate_interpreter(item)
            if executable is None:
                continue

            if item in ("pwsh", "powershell"):
                return [executable, "-NoLogo", "-Command", "-"]

            return [executable]

        return None

        Return a formatted command for the first specified interpreter that can be
        located.
        
poethepoet/task/shell.py