Skip to content

Commit

Permalink
disable telemetry if running in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bendhouseart committed Sep 13, 2024
1 parent 78a3bcf commit 5b80e5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion matlab/telemetry.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ function telemetry(telemetry_data, input_path, output_path)
end

disable_telemetry = strcmpi(getenv("TELEMETRY_ENABLED"), 'false');

% if running in CI don't run telemetry
running_in_ci = strcmpi(getenv("CI"), 'true');

if disable_telemetry | disable_telemetry_env
if disable_telemetry | disable_telemetry_env | running_in_ci
e = false;
else
e = true;
Expand Down
2 changes: 1 addition & 1 deletion pypet2bids/pypet2bids/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def telemetry_enabled(config_path=None):
load_dotenv(dotenv_path=config_file)

# check to see if telemetry is disabled
if os.getenv("PET2BIDS_TELEMETRY_ENABLED", "").lower() == "false":
if os.getenv("PET2BIDS_TELEMETRY_ENABLED", "").lower() == "false" or os.getenv("CI", "false") == "true":
return False
else:
return True
Expand Down

0 comments on commit 5b80e5a

Please sign in to comment.