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
When this fix db61cee was merged for back in the days for v0.1.12, things worked nice and clear.
--base specified the base dir
--gruntfile specified the gruntfile, and if no base was given base was inferred from gruntfile, just as if you hadn't specified it at all
Then two days later came 0.1.13 with c60e419 and ruined it
--base specifies the base dir only if no gruntfile specified, otherwise it's silently ignored
--gruntfile specifies the base dir and gruntfile
I find this decision to opt out of the IMHO much more logical 0.1.12 logic very strange and in clear violation of POLA. Perhaps there's a valid reason, but I just can't see it. I would personally like to see this reverted.
However, at the very least I think this should definitely be more clearly communicated. It should warn (or even error?) if the extraneous --base option is provided when --gruntfile is specified and this should definitely be communicated in the --help docs more clearly, (which) currently say:
--base Specify an alternate base path. By default,
all file paths are relative to the
Gruntfile. (grunt.file.setBase) *
--gruntfile Specify an alternate Gruntfile. By default,
grunt looks in the current or parent
directories for the nearest Gruntfile.js or
Gruntfile.coffee file.
Which leads one to believe Gruntfile is default and base can override. In light of the docs the current behaviour is quite strange.
We actually have some old deployment scripts/tools that have been built to rely on the capability to provide Gruntfile and base dir separately and this means we are locked to using grunt-cli 0.1.12. It is quite a coincident that the person who wrote the damn thing happened to have that particular grunt-cli version installed, but so it appears to be. :)
The text was updated successfully, but these errors were encountered:
Or if this can't be changed due to backwards incompatibility in some cases, then maybe there could be another cmd option, something like --force-base which could be used to set the base even if gruntfile is provided.
When this fix db61cee was merged for back in the days for v0.1.12, things worked nice and clear.
--base specified the base dir
--gruntfile specified the gruntfile, and if no base was given base was inferred from gruntfile, just as if you hadn't specified it at all
Then two days later came 0.1.13 with c60e419 and ruined it
--base specifies the base dir only if no gruntfile specified, otherwise it's silently ignored
--gruntfile specifies the base dir and gruntfile
I find this decision to opt out of the IMHO much more logical 0.1.12 logic very strange and in clear violation of POLA. Perhaps there's a valid reason, but I just can't see it. I would personally like to see this reverted.
However, at the very least I think this should definitely be more clearly communicated. It should warn (or even error?) if the extraneous --base option is provided when --gruntfile is specified and this should definitely be communicated in the --help docs more clearly, (which) currently say:
Which leads one to believe Gruntfile is default and base can override. In light of the docs the current behaviour is quite strange.
We actually have some old deployment scripts/tools that have been built to rely on the capability to provide Gruntfile and base dir separately and this means we are locked to using grunt-cli 0.1.12. It is quite a coincident that the person who wrote the damn thing happened to have that particular grunt-cli version installed, but so it appears to be. :)
The text was updated successfully, but these errors were encountered: