Skip to content

Commit dadca4d

Browse files
balamurali27mergify[bot]
authored andcommitted
fix(server): Always raise error when nginx reload fails
Nginx reload might fail even though nginx -t works? (cherry picked from commit 9d41dfe)
1 parent cdad988 commit dadca4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

agent/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,11 @@ def _reload_nginx(self):
945945
return self.execute("sudo systemctl reload nginx")
946946
except AgentException as e:
947947
try:
948-
return self.execute("sudo nginx -t")
948+
self.execute("sudo nginx -t")
949949
except AgentException as e2:
950950
raise e2 from e
951+
else:
952+
raise e
951953

952954
def _render_template(self, template, context, outfile, options=None):
953955
if options is None:

0 commit comments

Comments
 (0)