docs/build_docs.py
"-d",  
                self._doctree_dir,
                "-c",
                DOCS_DIR,
                "-w",  
                tmp_file.name,
                self._src_dir,  
                self._out_dir,  
            ]
            print("Executing cmd: ", " ".join([shlex.quote(c) for c in build_cmd]))
            env = os.environ.copy()
            env['AIRFLOW_PACKAGE_NAME'] = self.package_name
            completed_proc = run(  
                build_cmd, cwd=self._src_dir, env=env
            )
            if completed_proc.returncode != 0:
                build_errors.append(
                    DocBuildError(
                        file_path=None,
                        line_no=None,
                        message=f"Sphinx returned non-zero exit status: {completed_proc.returncode}.",
                    )
                )
            tmp_file.seek(0)
            warning_text = tmp_file.read().decode()
            
            warning_text = re.sub(r"\x1B[@-_][0-?]*[ -/]*[@-~]", "", warning_text)
            build_errors.extend(parse_sphinx_warnings(warning_text, self._src_dir))
        return build_errors
def get_available_packages():