**suggestion:** Add error handling for ExecWait and Exec commands
The current implementation doesn't check if the ExecWait and Exec commands succeed. Consider adding error checking and informing the user if these commands fail, possibly providing troubleshooting steps.
Function FinishPageLeave
${NSD_GetState} $Checkbox_LLM $0
${If} $0 == ${BST_CHECKED}
ExecWait 'docker-compose -f "$INSTDIR\local-llm-container\docker-compose.yml" up -d --build' $1
${If} $1 != 0
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to launch Local LLM. Please check your Docker installation."
${EndIf}
${EndIf}
${NSD_GetState} $Checkbox_Speech2Text $0
${If} $0 == ${BST_CHECKED}
ExecWait 'docker-compose -f "$INSTDIR\speech2text-container\docker-compose.yml" up -d --build' $1
${If} $1 != 0
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to launch Speech2Text. Please check your Docker installation."
${EndIf}
${EndIf}
${NSD_GetState} $Checkbox_FreeScribe $0
${If} $0 == ${BST_CHECKED}
Exec '"$APPDATA\freescribe\freescribe-client.exe"'
${EndIf}
FunctionEnd
The current implementation doesn't check if the ExecWait and Exec commands succeed. Consider adding error checking and informing the user if these commands fail, possibly providing troubleshooting steps.
_Originally posted by @sourcery-ai[bot] in https://github.com/ClinicianFOCUS/clinicianfocus-installer/pull/4#discussion_r1797211807_