Skip to content

Commit

Permalink
Merge pull request girder#622 from girder/grunt-readServerConfig
Browse files Browse the repository at this point in the history
Fix a Grunt failure when no "server" section is defined in the local config
  • Loading branch information
zachmullen committed Jan 15, 2015
2 parents 10cebf1 + 4e821ff commit 0c1095d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ module.exports = function (grunt) {
}
try {
var cfg = JSON.parse(stdout);
apiRoot = (cfg.server.api_root || '/api/v1').replace(/\"/g, "");
staticRoot = (cfg.server.static_root || '/static').replace(/\"/g, "");
apiRoot = ((cfg.server && cfg.server.api_root) || '/api/v1').replace(/\"/g, "");
staticRoot = ((cfg.server && cfg.server.static_root) || '/static').replace(/\"/g, "");
console.log('Static root: ' + staticRoot.bold);
console.log('API root: ' + apiRoot.bold);
}
Expand Down

0 comments on commit 0c1095d

Please sign in to comment.