Skip to content

Commit 480ab9a

Browse files
Merge pull request #4 from gaurav-nelson/trap
Add signal trap for graceful script termination
2 parents cdc292b + 85b0e00 commit 480ab9a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/rhacs-api-docs-gen.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ cleanup() {
266266
printf "${GREEN}Cleaned up generated files.${NC}\n"
267267
}
268268

269+
trap 'print_message $RED "❌ Script interrupted, Exitting..."; exit 1' SIGINT SIGTERM
270+
269271
# Main script execution based on command
270272
case "$1" in
271273
generate)

0 commit comments

Comments
 (0)