mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
Code refactor
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user