UNPKG

@catladder/cli

Version:

Panter cli tool for cloud CI/CD and DevOps

25 lines 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getShell = void 0; const child_process_promise_1 = require("child-process-promise"); const getShell = async (namespace, podName) => { const command = `kubectl exec -it ${podName} -n ${namespace} -- /bin/sh -xc 'bash||sh'`; try { await (0, child_process_promise_1.spawn)(command, { stdio: "inherit", shell: true, env: { ...process.env, DEBUG: "", }, }); } catch (e) { // tslint:disable-next-line:no-console if (e.code !== 130) { console.log(e); } } }; exports.getShell = getShell; //# sourceMappingURL=shell.js.map