Skip to content

Commit 9bc1d55

Browse files
authored
Merge pull request #1269 from kubernetes-client/fix20
Add node 20 to our test matrix, remove node 14, fix test for node 20.
2 parents e5b15c3 + 09ead53 commit 9bc1d55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node: [ '18', '16', '14' ]
14+
node: [ '20', '18', '16' ]
1515
name: Node ${{ matrix.node }} validation
1616
steps:
1717
- uses: actions/checkout@v4

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class KubeConfig {
126126

127127
public loadFromFile(file: string, opts?: Partial<ConfigOptions>): void {
128128
const rootDirectory = path.dirname(file);
129-
this.loadFromString(fs.readFileSync(file, 'utf8'), opts);
129+
this.loadFromString(fs.readFileSync(file).toString('utf-8'), opts);
130130
this.makePathsAbsolute(rootDirectory);
131131
}
132132

@@ -245,7 +245,7 @@ export class KubeConfig {
245245
const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`;
246246
let namespace: string | undefined;
247247
if (fileExists(namespaceFile)) {
248-
namespace = fs.readFileSync(namespaceFile, 'utf8');
248+
namespace = fs.readFileSync(namespaceFile).toString('utf-8');
249249
}
250250
this.contexts = [
251251
{

0 commit comments

Comments
 (0)