add telemetry support for zsh
Zsh is the default shell on the new macOS and does not implement function export features. In order to have both bash and zsh to work we changed the snippet for opting-in telemetry using a variable to store the function. test-plan: - local docker smoke passes - setup/update scripts work in bash - setup/update scripts work if executed on zsh - test enable/disable telemetry from .bashrc and .zshrc Change-Id: I4e034f486dde078bba517172114e9b3e01f1817f Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264024 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: James Butters <jbutters@instructure.com> QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com> Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
This commit is contained in:
parent
2244ec98ab
commit
493549ddc8
|
@ -73,6 +73,9 @@ function _canvas_lms_telemetry_enabled() {
|
|||
}
|
||||
|
||||
function _canvas_lms_opt_in_telemetry() {
|
||||
if [ -n "$CANVAS_LMS_ACTIVATE_TELEMETRY" ]; then
|
||||
eval "$CANVAS_LMS_ACTIVATE_TELEMETRY"
|
||||
fi
|
||||
SCRIPT_NAME=$1
|
||||
LOG_FILE=$2
|
||||
if installed _canvas_lms_activate_telemetry; then
|
||||
|
|
Loading…
Reference in New Issue