Skip to content

Commit

Permalink
Add support for disabling telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomdk committed Aug 8, 2024
1 parent 8cc90e5 commit e63bd89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/posthog-manager/src/getPosthogManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export async function getPosthogManager(): Promise<PosthogManager> {
async function createPosthogManager(): Promise<PosthogManager> {
try {
const posthogApiKey = process.env.POSTHOG_API_KEY;
if (posthogApiKey == null) {
const disableTelemetry = process.env.FERN_DISABLE_TELEMETRY === "true";
if (posthogApiKey == null || disableTelemetry) {
return new NoopPosthogManager();
}
const userToken = await getUserToken();
Expand Down

0 comments on commit e63bd89

Please sign in to comment.