This commit is contained in:
James Ives 2019-11-10 14:28:04 -05:00
parent 5f7fb1eb2e
commit 0c68fff403
2 changed files with 7 additions and 5 deletions

View File

@ -28,9 +28,11 @@ function init() {
if (!constants_1.action.accessToken && !constants_1.action.gitHubToken) {
return core.setFailed("You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy.");
}
if (constants_1.action.build.startsWith("/") || constants_1.action.build.startsWith("./")) {
return core.setFailed(`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`);
}
/*if (action.build.startsWith("/") || action.build.startsWith("./")) {
return core.setFailed(
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
);
}*/
yield util_1.execute(`git init`, constants_1.action.build);
yield util_1.execute(`git config user.name ${constants_1.action.pusher.name}`, constants_1.action.build);
yield util_1.execute(`git config user.email ${constants_1.action.pusher.email}`, constants_1.action.build);

View File

@ -14,11 +14,11 @@ export async function init(): Promise<any> {
);
}
if (action.build.startsWith("/") || action.build.startsWith("./")) {
/*if (action.build.startsWith("/") || action.build.startsWith("./")) {
return core.setFailed(
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
);
}
}*/
await execute(`git init`, action.build);
await execute(`git config user.name ${action.pusher.name}`, action.build);