diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6df7613ac6..4d1394aa38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '18', '16', '14' ] + node: [ '20', '18', '16' ] name: Node ${{ matrix.node }} validation steps: - uses: actions/checkout@v4 diff --git a/src/config.ts b/src/config.ts index 00bae6d2ca..f4ea172d0d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -126,7 +126,7 @@ export class KubeConfig { public loadFromFile(file: string, opts?: Partial): void { const rootDirectory = path.dirname(file); - this.loadFromString(fs.readFileSync(file, 'utf8'), opts); + this.loadFromString(fs.readFileSync(file).toString('utf-8'), opts); this.makePathsAbsolute(rootDirectory); } @@ -245,7 +245,7 @@ export class KubeConfig { const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`; let namespace: string | undefined; if (fileExists(namespaceFile)) { - namespace = fs.readFileSync(namespaceFile, 'utf8'); + namespace = fs.readFileSync(namespaceFile).toString('utf-8'); } this.contexts = [ {