Change azdata executions to point to kube config and cluster contexts (#13569)

This commit is contained in:
Arvind Ranasaria
2020-12-23 23:45:00 -08:00
committed by GitHub
parent cf7c506d75
commit f314a9e1e6
24 changed files with 180 additions and 114 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AdditionalEnvVars } from 'azdata-ext';
import * as cp from 'child_process';
import * as sudo from 'sudo-prompt';
import * as loc from '../localizedConstants';
@@ -47,7 +48,7 @@ export type ProcessOutput = { stdout: string, stderr: string };
* @param args Optional args to pass, every arg and arg value must be a separate item in the array
* @param additionalEnvVars Additional environment variables to add to the process environment
*/
export async function executeCommand(command: string, args: string[], additionalEnvVars?: { [key: string]: string },): Promise<ProcessOutput> {
export async function executeCommand(command: string, args: string[], additionalEnvVars?: AdditionalEnvVars): Promise<ProcessOutput> {
return new Promise((resolve, reject) => {
Logger.log(loc.executingCommand(command, args));
const stdoutBuffers: Buffer[] = [];