Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #21 from bolgovr/v0.4.14

do not fail when lacking of permissions for writing
  • Loading branch information...
commit f59efa71c8532864aa639520f9045fa083c024dc 2 parents d329ff6 + a80b1c3
@lorenwest authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 lib/config.js
View
12 lib/config.js
@@ -641,8 +641,16 @@ Config.prototype._parseFile = function(fullFilename) {
// Make sure the runtime.json file exists. This is required for fs.watch().
var checkRuntimeJson = function() {
if (fullFilename == runtimeJsonFilename) {
-console.log("Writing runtime json file");
- FileSystem.writeFileSync(runtimeJsonFilename, '{}');
+ console.log("Writing runtime json file");
+ try {
+ FileSystem.writeFileSync(runtimeJsonFilename, '{}');
+ } catch (e) {
+ console.log("Cannot write runtime.json file " + e);
+ //if we cannot write file, clear watch function
+ t.watchForConfigFileChanges = function () {
+ return;
+ };
+ }
return {};
}
return null;
Please sign in to comment.
Something went wrong with that request. Please try again.