Skip to content

Commit

Permalink
fix we need a path error
Browse files Browse the repository at this point in the history
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)
```
  • Loading branch information
Clemens Buchacher committed Aug 13, 2018
1 parent 89a3289 commit 1bdba21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node-client/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class KubeConfig {
// Format in file is {<query>}, so slice it out and add '$'
pathKey = '$' + pathKey.slice(1, -1);

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

0 comments on commit 1bdba21

Please sign in to comment.