Skip to content

Commit 0e442a8

Browse files
author
Mads Jon Nielsen
committed
Fix bug introduced in findEnvMatchedVariables
1 parent 99f8af1 commit 0e442a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class Utils {
150150
const envMatchedVariables: {[key: string]: string} = {};
151151
for (const [k, v] of Object.entries(variables)) {
152152
for (const entry of v.environments) {
153-
if (entry.regexp.exec(environment?.name ?? "") || entry.regexp.source === ".*") {
153+
if (environment?.name.match(entry.regexp) || entry.regexp.source === ".*") {
154154
if (fileVariablesDir != null && v.type === "file" && !entry.fileSource) {
155155
envMatchedVariables[k] = `${fileVariablesDir}/${k}`;
156156
fs.mkdirpSync(`${fileVariablesDir}`);

0 commit comments

Comments
 (0)