Skip to content

Commit 191f70c

Browse files
committed
1 parent 59738a1 commit 191f70c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

readthedocs/vcs_support/base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import logging
55
import os
66
import shutil
7+
from readthedocs.doc_builder.exceptions import BuildEnvironmentWarning
8+
from readthedocs.projects.exceptions import RepositoryError
79

810

911
log = logging.getLogger(__name__)
@@ -102,7 +104,13 @@ def run(self, *cmd, **kwargs):
102104
'shell': False,
103105
})
104106

105-
build_cmd = self.environment.run(*cmd, **kwargs)
107+
try:
108+
build_cmd = self.environment.run(*cmd, **kwargs)
109+
except BuildEnvironmentWarning as e:
110+
# Re raise as RepositoryError,
111+
# so isn't logged as ERROR.
112+
raise RepositoryError(str(e))
113+
106114
# Return a tuple to keep compatibility
107115
return (build_cmd.exit_code, build_cmd.output, build_cmd.error)
108116

0 commit comments

Comments
 (0)