From 1a86c5b32613d6bbb30a30ea1847d8bd342c8c80 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Wed, 20 Dec 2023 14:56:15 +0100 Subject: [PATCH] Fix plug space filtering (again) --- common/spaces/plug_space_primitives.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/spaces/plug_space_primitives.ts b/common/spaces/plug_space_primitives.ts index 5990f7e8..d65b4259 100644 --- a/common/spaces/plug_space_primitives.ts +++ b/common/spaces/plug_space_primitives.ts @@ -32,10 +32,18 @@ export class PlugSpacePrimitives implements SpacePrimitives { for ( const { operation, pattern, plug, name, env } of this.hook.spaceFunctions ) { - // console.log("Going to match agains pattern", pattern, path); + // console.log( + // "Going to match agains pattern", + // operation, + // pattern, + // path, + // this.env, + // env, + // ); if ( operation === type && path.match(pattern) && - (!this.env || (env && env === this.env)) + // Both envs are set, and they don't match + (!this.env || !env || env === this.env) ) { return plug.invoke(name, [path, ...args]); }