Skip to content

Commit 5005c31

Browse files
authored
Add env var when CLI is run from language-server (#848)
1 parent 9ffbe27 commit 5005c31

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/orange-experts-work.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/theme-language-server-node': patch
3+
---
4+
5+
[internal] Add env var when CLI command is run

packages/theme-language-server-node/src/metafieldDefinitions.ts

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export async function fetchMetafieldDefinitionsForURI(uri: string) {
1818
await exec(`${path} theme metafields pull`, {
1919
cwd: new URL(uri),
2020
timeout: 10_000,
21+
env: {
22+
...process.env,
23+
SHOPIFY_LANGUAGE_SERVER: '1',
24+
},
2125
});
2226
} catch (_) {
2327
// CLI command can break because of incorrect version or not being logged in

0 commit comments

Comments
 (0)