Skip to content

Commit fb60c0e

Browse files
authored
ci: Raise Documentation Generation Errors (#7559)
* ci: Raise Documentation Generation Errors
1 parent 44fa207 commit fb60c0e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/generate_docs.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ def run_command(command):
123123
stderr=subprocess.PIPE,
124124
)
125125
except subprocess.CalledProcessError as e:
126-
log_message(f"Error executing command: {e.cmd}")
127-
log_message(e.output)
128-
log_message(e.stderr)
126+
raise (e)
129127

130128

131129
def clone_from_github(repo, tag, org):
@@ -137,7 +135,6 @@ def clone_from_github(repo, tag, org):
137135
"""
138136
# Construct the full GitHub repository URL
139137
repo_url = f"https://github.com/{org}/{repo}.git"
140-
print(repo_url)
141138
# Construct the git clone command
142139
if tag:
143140
clone_command = [
@@ -155,7 +152,7 @@ def clone_from_github(repo, tag, org):
155152
subprocess.run(clone_command, check=True)
156153
log_message(f"Successfully cloned {repo}")
157154
except subprocess.CalledProcessError as e:
158-
log_message(f"Failed to clone {repo}. Error: {e}")
155+
raise (e)
159156

160157

161158
def parse_repo_tag(repo_tags):
@@ -189,8 +186,8 @@ def get_git_repo_name(file_path):
189186
.decode()
190187
.strip()
191188
)
192-
except subprocess.CalledProcessError:
193-
return None
189+
except subprocess.CalledProcessError as e:
190+
raise (e)
194191

195192
# Extract repository name from the remote URL.
196193
if remote_url.endswith(".git"):

0 commit comments

Comments
 (0)