You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2016/03/04 00:26:32 UTC
docs commit: CB-10737 Fetching now errors out on invalid entries and
non-200 responses.
Repository: cordova-docs
Updated Branches:
refs/heads/master b7a4a1920 -> 73a881b0c
CB-10737 Fetching now errors out on invalid entries and non-200 responses.
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/73a881b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/73a881b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/73a881b0
Branch: refs/heads/master
Commit: 73a881b0c2d76b42bf7a7dbe5b242b26a46f7a4f
Parents: b7a4a19
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Mon Feb 29 21:05:45 2016 -0800
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Thu Mar 3 15:25:22 2016 -0800
----------------------------------------------------------------------
tools/bin/fetch_docs.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/73a881b0/tools/bin/fetch_docs.js
----------------------------------------------------------------------
diff --git a/tools/bin/fetch_docs.js b/tools/bin/fetch_docs.js
index 5c3e7b0..3c27f0c 100644
--- a/tools/bin/fetch_docs.js
+++ b/tools/bin/fetch_docs.js
@@ -176,7 +176,7 @@ function main () {
// verify and process entry
var fetchedFileConfig = getFetchedFileConfig(entry);
if (!fetchedFileConfig) {
- return;
+ process.exit(1);
}
// get info for fetching
@@ -192,6 +192,11 @@ function main () {
// open an HTTP request for the file
var request = https.get(fetchURI, function (response) {
+ if (response.statusCode !== 200) {
+ console.error("Failed to download " + fetchURI + ": got " + response.statusCode);
+ process.exit(1);
+ }
+
// read in the response
var fileContents = '';
response.setEncoding('utf8');
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org