Skip to content

Commit e941fd5

Browse files
Merge pull request #15 from gjsjohnmurray/green-lion
Don't encode %SYS namespace queryparam
2 parents a1577dc + ad10504 commit e941fd5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commonRunTestsHandler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r
131131
// When client-side mode is using 'objectscript.conn.docker-compose the first piece of 'authority' is blank,
132132
if (authority.startsWith(":")) {
133133
const namespace = authority.slice(1).toUpperCase();
134-
query = `ns=${encodeURIComponent(namespace)}`;
134+
// Arguably this should be `encodeURIComponent(namespace)` but vscode-objectscript extension doesn't decode the ns queryparam
135+
// (see https://github.com/intersystems-community/vscode-objectscript/blob/978dcff2bafad6261919a13e0c69f025d6027c61/src/api/index.ts#L109)
136+
// It presumably gets away with this because %-prefixed namespaces are rare, and the common one %SYS can't be mistaken for an encoded one.
137+
query = `ns=${namespace}`;
135138
authority = folder?.name || "";
136139
}
137140
const testRoot = vscode.Uri.from({ scheme: 'isfs', authority, path: `/.vscode/UnitTestRoot/${username}`, query });

0 commit comments

Comments
 (0)