зеркало из https://github.com/microsoft/TACO.git
Added workaround for Cordova-ios now sometimes throwing a string instead of an error as part of 4.0.1 change
This commit is contained in:
Родитель
b4b021c30f
Коммит
54bf91cb77
|
@ -91,9 +91,17 @@ class Builder {
|
|||
Logger.log(resources.getString("DoneBuilding", self.currentBuild.buildNumber));
|
||||
self.currentBuild.updateStatus(BuildInfo.COMPLETE);
|
||||
})
|
||||
.catch(function (err: Error): void {
|
||||
Logger.log(resources.getString("ErrorBuilding", self.currentBuild.buildNumber, err.message));
|
||||
self.currentBuild.updateStatus(BuildInfo.ERROR, "BuildFailedWithError", err.message);
|
||||
.catch(function (err: Error | string): void {
|
||||
var errorMessage: string;
|
||||
|
||||
if (typeof err === "string") {
|
||||
errorMessage = err;
|
||||
} else {
|
||||
errorMessage = err.message;
|
||||
}
|
||||
|
||||
Logger.log(resources.getString("ErrorBuilding", self.currentBuild.buildNumber, errorMessage));
|
||||
self.currentBuild.updateStatus(BuildInfo.ERROR, "BuildFailedWithError", errorMessage);
|
||||
}).then(function (): BuildInfo {
|
||||
return self.currentBuild;
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче