Skip to content

Commit 1bdba21

Browse files
author
Clemens Buchacher
committed
fix we need a path error
Commit 4ef9254 (Add tslint validation.) renames path to pathKey, but misses one usage of the variable. This leads to the following error: ``` AssertionError [ERR_ASSERTION]: we need a path at JSONPath.query (...\node_modules\jsonpath\lib\index.js:92:10) at KubeConfig.applyAuthorizationHeader (...\node_modules\@kubernetes\client-node\dist\config.js:174:59) ```
1 parent 89a3289 commit 1bdba21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node-client/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class KubeConfig {
228228
// Format in file is {<query>}, so slice it out and add '$'
229229
pathKey = '$' + pathKey.slice(1, -1);
230230

231-
config['access-token'] = jsonpath.query(resultObj, path);
231+
config['access-token'] = jsonpath.query(resultObj, pathKey);
232232
token = 'Bearer ' + config['access-token'];
233233
} else {
234234
throw new Error('Token is expired!');

0 commit comments

Comments
 (0)