-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gulp.dest uses chmod on files #1012
Comments
What OS are you using? The |
Yeah, I understand how chmod works on GNU/Linux. But on my systems gulp can and will by run by many different users (which are in the same group, though). IMO gulp has absolutely no need to run chmod on this file, since he only needs to write to it. If I'm unable to turn of this feature I'm absolute ok with catching and ignoring it - my only intention is that the watcher doesn't fail because of this. Could you show me an example how to catch this error? |
@hashworks this shouldn't be a problem. can you go here in vinyl-fs (in your local node_modules folder) and add some logging and let me know what these vars are? |
My However I added this before line 27: console.log(currentMode);
console.log(file.stat.mode); Which results in:
|
It's different? Can you run |
└─┬ gulp@3.8.11 Just as the package.json of gulp says - ^0.3.0. |
Can you try this with gulp 4? AFAIK this should be totally fixed |
Seems like the 4.0 build is broken: var gulp = require('gulp');
gulp.task('default', function() {
return gulp.src('./screen.css')
.pipe(gulp.dest('./'));
});
This happens as well when I call a gulpfile.js that only includes |
@hashworks you need to be using the version of the CLI globally installed from gulpjs/gulp-cli#4.0 |
Ah, that was obvious. It works with 4.0, no chmod error. I'll wait for a release then. Thanks 👍 |
@hashworks There was a bug with the chmod stuff in 3.x - feel free to use the 4.0 stuff it's stable, just waiting on a few more issues to land before we publish |
When I pipe my compiled css into gulp.dest(folder) it will fail with an error:
This is because
screen.css
already exits and only gets overriden - however the user running gulp isn't the owner of the file.This is a bug since according to the documentation chmod gets applied to new folders only:
options.mode - Octal permission string specifying mode for any folders that need to be created for output folder.
Code:
PS: If this isn't a bug but a feature, how can I turn this off (or handle it properly)?
The text was updated successfully, but these errors were encountered: