Skip to content

Commit 7056578

Browse files
authored
Fix generate API. Also, return nonzero error
code when contentctl action raises an uncaught error
1 parent 7a6cada commit 7056578

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎bin/contentctl_project/contentctl_infrastructure/builder/security_content_story_builder.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@
1515
class SecurityContentStoryBuilder(StoryBuilder):
1616
story: Story
1717
check_references: bool
18+
app_name: str
1819

1920
def __init__(self, output_path:Union[str,None]=None, check_references: bool = False):
2021
self.check_references = check_references
2122
self.app_name = self.get_app_name_from_manifest(output_path)
2223

2324
def get_app_name_from_manifest(self, output_path:Union[str,None])->str:
24-
if output_path is None:
25+
26+
if output_path is None:
27+
return "ESCU"
28+
29+
elif "dist/api" in output_path:
30+
print("API does not have an 'app.manifest' file - assuming app is ESCU")
2531
return "ESCU"
2632

2733
try:

‎contentctl.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ def main(args):
411411
return args.func(args)
412412
except Exception as e:
413413
print(f"Error for function [{args.func.__name__}]: {str(e)}")
414+
sys.exit(1)
414415

415416
if __name__ == "__main__":
416417
main(sys.argv[1:])

0 commit comments

Comments
 (0)