You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my grunt process I use grunt.file.setBase("../") in order to include my entire repo in the grunt process.
The module uses setBase() to allow for computing adjustment base URLs, etc (understandable), but at the end it sets the base back to a stored base path of path.resolve('./') which may not actually be the original base path (it only MIGHT be if no setBase() was called after the module initialized).
This can be corrected by adding this line to the beginning of the multi-task:
var originalCWD = process.cwd();
and then replacing the grunt.file.setBase(gruntfileDir); at the end with:
grunt.file.setBase(originalCWD);
This ensures that any setBase called by the grunt setup process will be properly respected at the beginning and restored at the end of each task.
The text was updated successfully, but these errors were encountered:
In my grunt process I use
grunt.file.setBase("../")
in order to include my entire repo in the grunt process.The module uses
setBase()
to allow for computing adjustment base URLs, etc (understandable), but at the end it sets the base back to a stored base path ofpath.resolve('./')
which may not actually be the original base path (it only MIGHT be if nosetBase()
was called after the module initialized).This can be corrected by adding this line to the beginning of the multi-task:
and then replacing the
grunt.file.setBase(gruntfileDir);
at the end with:This ensures that any setBase called by the grunt setup process will be properly respected at the beginning and restored at the end of each task.
The text was updated successfully, but these errors were encountered: