From f97e1149d0612574374f70e9b0a1857149abbf69 Mon Sep 17 00:00:00 2001 From: Inksprout Date: Wed, 2 Feb 2022 12:16:47 +1100 Subject: [PATCH 1/2] feat: collect usage telemetry data --- src/spawn/spawn.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spawn/spawn.ts b/src/spawn/spawn.ts index 09446206..e9a577de 100644 --- a/src/spawn/spawn.ts +++ b/src/spawn/spawn.ts @@ -17,6 +17,10 @@ export class Spawn { argMapping: { [id: string]: string } = {} ): ChildProcess { const envVars = JSON.parse(JSON.stringify(process.env)); // Create copy of environment variables + + envVars['PACT_EXECUTING_LANGUAGE'] = 'node.js' + envVars['PACT_EXECUTING_LANGUAGE_VERSION'] = process.versions.node + // Remove environment variable if there // This is a hack to prevent some weird Travelling Ruby behaviour with Gems // https://github.com/pact-foundation/pact-mock-service-npm/issues/16 From 8f4e364950f38c9f8750f3a072a12b1ff54231cc Mon Sep 17 00:00:00 2001 From: Inksprout Date: Mon, 7 Feb 2022 11:56:53 +1100 Subject: [PATCH 2/2] fix: prettier --- src/spawn/spawn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spawn/spawn.ts b/src/spawn/spawn.ts index e9a577de..0e35182e 100644 --- a/src/spawn/spawn.ts +++ b/src/spawn/spawn.ts @@ -18,8 +18,8 @@ export class Spawn { ): ChildProcess { const envVars = JSON.parse(JSON.stringify(process.env)); // Create copy of environment variables - envVars['PACT_EXECUTING_LANGUAGE'] = 'node.js' - envVars['PACT_EXECUTING_LANGUAGE_VERSION'] = process.versions.node + envVars['PACT_EXECUTING_LANGUAGE'] = 'node.js'; + envVars['PACT_EXECUTING_LANGUAGE_VERSION'] = process.versions.node; // Remove environment variable if there // This is a hack to prevent some weird Travelling Ruby behaviour with Gems