Code refactor

This commit is contained in:
Akshaya M
2020-03-16 17:01:10 +05:30
parent 3e94d97948
commit 7fc98cfa3d
11 changed files with 204 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
import * as core from '@actions/core';
import Utils from './Utils';
import PowerShellToolRunner from './PowerShellToolRunner';
import ScriptBuilder from './ScriptBuilder';
import Utils from './Utilities/Utils';
import PowerShellToolRunner from './Utilities/PowerShellToolRunner';
import ScriptBuilder from './Utilities/ScriptBuilder';
import { Constants } from './Constants';
export class ServicePrincipalLogin implements IAzurePowerShellSession {

View File

@@ -11,10 +11,6 @@ export default class PowerShellToolRunner {
}
static async executePowerShellCommand(command: string, options: any = {}) {
try {
await exec.exec(`"${PowerShellToolRunner.psPath}" -Command "${command}"`, [], options);
} catch(error) {
throw new Error(error);
}
await exec.exec(`"${PowerShellToolRunner.psPath}" -Command "${command}"`, [], options);
}
}

View File

@@ -2,7 +2,7 @@ import * as os from 'os';
import * as exec from '@actions/exec';
import * as io from '@actions/io';
import { Constants } from './Constants';
import { Constants } from '../Constants';
import PowerShellToolRunner from './PowerShellToolRunner';
export default class Utils {