Skip to content

Commit

Permalink
Merge branch 'MDL-50115-29' of git://github.com/danpoltawski/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_29_STABLE
  • Loading branch information
David Monllao committed Feb 8, 2016
2 parents 5f90d5f + 5a906c5 commit 9876fc1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */

/**
* @copyright 2014 Andrew Nicols
Expand All @@ -26,8 +27,21 @@ module.exports = function(grunt) {
var path = require('path'),
fs = require('fs'),
tasks = {},
cwd = process.env.PWD || process.cwd(),
inAMD = path.basename(cwd) == 'amd';
cwd = process.env.PWD || process.cwd();

// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
grunt.log.ok('Setting root to '+cwd);
} else {
grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
}
}

var inAMD = path.basename(cwd) == 'amd';

// Project configuration.
grunt.initConfig({
Expand Down

0 comments on commit 9876fc1

Please sign in to comment.