1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use resolved pathname

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-07-13 17:14:22 -04:00
parent b5ed6eb81e
commit 6e104c5652

View File

@ -92,7 +92,7 @@ function _parseKubeApi(path: string): IKubeApiParsed {
} else {
switch (left.length) {
case 0:
throw new Error(`invalid apiPath: ${path}`);
throw new Error(`invalid apiPath: ${apiPath}`);
case 4:
[apiGroup, apiVersion, resource, name] = left;
break;
@ -136,7 +136,7 @@ function _parseKubeApi(path: string): IKubeApiParsed {
const apiBase = [apiPrefix, apiGroup, apiVersion, resource].filter(v => v).join("/");
if (!apiBase) {
throw new Error(`invalid apiPath: ${path}`);
throw new Error(`invalid apiPath: ${apiPath}`);
}
return {