diff --git a/dist/index.js b/dist/index.js index d0e4e4d..1d5c774 100644 --- a/dist/index.js +++ b/dist/index.js @@ -26587,20 +26587,19 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { const core = __nccwpck_require__(2186); -const { mkdir, writeFileSync, existsSync } = __nccwpck_require__(7147); +const { writeFileSync, existsSync, mkdirSync } = __nccwpck_require__(7147); const os = __nccwpck_require__(2037); const path = __nccwpck_require__(1017); try { // `who-to-greet` input defined in action metadata file const kubeconfig = core.getInput('kubeconfig'); - core.info(`input:\n${kubeconfig}\n************\n`) if(!kubeconfig){ throw { message: "kubeconfig should not be empty" } } const parentDir = path.join(os.homedir(),".kube") - mkdir(parentDir,{recursive:true}) + mkdirSync(parentDir,{recursive:true}) const configFile = path.join(parentDir,"config") if(existsSync(configFile) && !core.getBooleanInput("force")){ throw { diff --git a/package.json b/package.json index d69ad15..d808001 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "action-kubernetes-login", - "version": "0.0.4", + "version": "0.0.5", "type": "commonjs", "scripts": { "build": "ncc build src/index.js -o dist" diff --git a/src/index.js b/src/index.js index bad144c..2439eb3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,18 +1,17 @@ const core = require('@actions/core'); -const { mkdir, writeFileSync, existsSync } = require('fs'); +const { writeFileSync, existsSync, mkdirSync } = require('fs'); const os = require('os'); const path = require('path'); try { // `who-to-greet` input defined in action metadata file const kubeconfig = core.getInput('kubeconfig'); - core.info(`input:\n${kubeconfig}\n************\n`) if(!kubeconfig){ throw { message: "kubeconfig should not be empty" } } const parentDir = path.join(os.homedir(),".kube") - mkdir(parentDir,{recursive:true}) + mkdirSync(parentDir,{recursive:true}) const configFile = path.join(parentDir,"config") if(existsSync(configFile) && !core.getBooleanInput("force")){ throw {