Skip to content

Commit 19590c0

Browse files
Merge pull request #25 from Shopify/sd.usage_telemetry
Setting env variable for usage telemetry
2 parents 3458982 + e39039b commit 19590c0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/methods/build-function.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export async function buildFunction(functionPath?: string): Promise<BuildFunctio
4747
'--path', functionName
4848
], {
4949
cwd: appRootDir,
50-
stdio: ['pipe', 'pipe', 'pipe']
50+
stdio: ['pipe', 'pipe', 'pipe'],
51+
env: {
52+
...process.env,
53+
SHOPIFY_INVOKED_BY: 'shopify-function-test-helpers'
54+
}
5155
});
5256

5357
let stdout = '';

src/methods/get-function-info.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export async function getFunctionInfo(functionDir: string): Promise<FunctionInfo
3333
'--path', functionName
3434
], {
3535
cwd: appRootDir,
36-
stdio: ['pipe', 'pipe', 'pipe']
36+
stdio: ['pipe', 'pipe', 'pipe'],
37+
env: {
38+
...process.env,
39+
SHOPIFY_INVOKED_BY: 'shopify-function-test-helpers'
40+
}
3741
});
3842

3943
let stdout = '';

0 commit comments

Comments
 (0)