Compare commits

..

1 Commits

Author SHA1 Message Date
Balaga Gayatri
511b21ad6e Error handling for token permissions 2022-06-17 15:29:38 +05:30
4 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ class Constants {
exports.default = Constants; exports.default = Constants;
Constants.prefix = "az_"; Constants.prefix = "az_";
Constants.moduleName = "Az.Accounts"; Constants.moduleName = "Az.Accounts";
Constants.versionPattern = /[0-9]+\.[0-9]+\.[0-9]+/; Constants.versionPattern = /[0-9]\.[0-9]\.[0-9]/;
Constants.AzureCloud = "AzureCloud"; Constants.AzureCloud = "AzureCloud";
Constants.Subscription = "Subscription"; Constants.Subscription = "Subscription";
Constants.ServicePrincipal = "ServicePrincipal"; Constants.ServicePrincipal = "ServicePrincipal";

View File

@@ -214,10 +214,10 @@ function main() {
} }
catch (error) { catch (error) {
if (!isAzCLISuccess) { if (!isAzCLISuccess) {
core.setFailed(`Az CLI Login failed with ${error}. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows`); core.setFailed("Az CLI Login failed. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows");
} }
else { else {
core.setFailed(`Azure PowerShell Login failed with ${error}. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows"`); core.setFailed(`Azure PowerShell Login failed. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows"`);
} }
} }
finally { finally {

View File

@@ -1,7 +1,7 @@
export default class Constants { export default class Constants {
static readonly prefix: string = "az_"; static readonly prefix: string = "az_";
static readonly moduleName: string = "Az.Accounts"; static readonly moduleName: string = "Az.Accounts";
static readonly versionPattern = /[0-9]+\.[0-9]+\.[0-9]+/; static readonly versionPattern = /[0-9]\.[0-9]\.[0-9]/;
static readonly AzureCloud: string = "AzureCloud"; static readonly AzureCloud: string = "AzureCloud";
static readonly Subscription: string = "Subscription"; static readonly Subscription: string = "Subscription";

View File

@@ -209,10 +209,10 @@ async function main() {
} }
catch (error) { catch (error) {
if (!isAzCLISuccess) { if (!isAzCLISuccess) {
core.setFailed(`Az CLI Login failed with ${error}. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows"`); core.setFailed("Az CLI Login failed. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows");
} }
else { else {
core.setFailed(`Azure PowerShell Login failed with ${error}. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows"`); core.setFailed(`Azure PowerShell Login failed. Please check the credentials and make sure az is installed on the runner. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows"`);
} }
} }
finally { finally {