Formatting

This commit is contained in:
JamesIves 2020-01-19 16:19:40 -05:00
parent 4e8c644240
commit 9e5e2050db
2 changed files with 7 additions and 3 deletions

View File

@ -23,7 +23,7 @@ function init() {
util_1.isNullOrUndefined(constants_1.action.gitHubToken) &&
util_1.isNullOrUndefined(constants_1.action.ssh)) {
core_1.setFailed("You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.");
throw Error("No deployment token/method was provided.");
throw Error("No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.");
}
if (constants_1.action.build.startsWith("/") || constants_1.action.build.startsWith("./")) {
core_1.setFailed(`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`);

View File

@ -23,7 +23,9 @@ export async function init(): Promise<any> {
"You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true."
);
throw Error("No deployment token/method was provided.");
throw Error(
"No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true."
);
}
if (action.build.startsWith("/") || action.build.startsWith("./")) {
@ -31,7 +33,9 @@ export async function init(): Promise<any> {
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
);
throw Error("Incorrectly formatted build folder.");
throw Error(
"Incorrectly formatted build folder. The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly."
);
}
console.log(`Deploying using ${tokenType}... 🔑`);