fix(aio): skip PWA test when redeploying non-public commit

This commit is contained in:
Georgios Kalpakas
2017-08-03 11:40:39 +03:00
committed by Hans
parent 4d523fda98
commit 06faac8b5c
6 changed files with 22 additions and 17 deletions

View File

@ -32,7 +32,8 @@ export class BuildCreator extends EventEmitter {
then(() => Promise.all([this.exists(prDir), this.exists(shaDir)])).
then(([prDirExisted, shaDirExisted]) => {
if (shaDirExisted) {
throw new UploadError(409, `Request to overwrite existing directory: ${shaDir}`);
const publicOrNot = isPublic ? 'public' : 'non-public';
throw new UploadError(409, `Request to overwrite existing ${publicOrNot} directory: ${shaDir}`);
}
dirToRemoveOnError = prDirExisted ? shaDir : prDir;