Before you open this issue, please complete the following tasks:
[x] use the search bar at the top of the page to search this repository for similar issues or discussions that have already been opened.
[x] if you are looking for help from the gulp team or community, open a discussion.
[x] if you think there is a problem with the plugin you're using, open a discussion.
[x] if you think there is a bug in our code, open this issue.
What were you expecting to happen?
Gulp.dest copies files between filesystems as it happened in v4.
What actually happened?
No files are copied, but they are present in intermediate directory.
Please give us a sample of your gulpfile
import path from 'path';
import os from 'os';
// Gulp specific
import Gulp from 'gulp';
const dirs = {
tmp: path.join(os.tmpdir(), 'gulp-build-cache'),
out: 'public/static',
};
// ---
function hash() {
return Gulp.src(`${dirs.tmp}/**/*.*`)
.pipe(Gulp.dest(dirs.out))
}
// ---
function css() {
return Gulp.src('assets/public/**/*.css')
.pipe(Gulp.dest(dirs.tmp));
}
// ---
export const build = Gulp.series(css, hash);
Terminal output / screenshots
vagrant@debian11:/code$ yarn gulp build
yarn run v1.22.22
$ node ./node_modules/gulp/bin/gulp.js build
[16:12:23] Using gulpfile /code/gulpfile.mjs
[16:12:23] Starting 'build'...
[16:12:23] Starting 'css'...
[16:12:30] Finished 'css' after 7.14 s
[16:12:30] Starting 'hash'...
[16:12:39] Finished 'hash' after 8.38 s
[16:12:39] Finished 'build' after 16 s
Done in 16.90s.
vagrant@debian11:/code$ ls -l /tmp/gulp-build-cache/
total 4
drwxr-xr-x 6 vagrant vagrant 4096 Apr 6 16:11 css
vagrant@debian11:/code$ ls -l public/static
total 0
Please provide the following information:
OS & version [e.g. MacOS Catalina 10.15.4]: Debian GNU/Linux 11
node version (run node -v): v18.20.1
npm version (run npm -v): 10.5.0
gulp version (run gulp -v): 5.0.0 (CLI 3.0.0)
Additional information
Changing tmp: path.join(os.tmpdir(), 'gulp-build-cache'), to tmp: 'assets/build', results in working script and files are properly copied from intermediate directory to final one. /tmp and the /code (cwd in which gulp is executed) are on different filesystems.
vagrant@debian11:/code$ sed -i "s#path.join(os.tmpdir(), 'gulp-build-cache')#'assets/build'#g" gulpfile.mjs
vagrant@debian11:/code$ yarn gulp build
yarn run v1.22.22
$ node ./node_modules/gulp/bin/gulp.js build
[16:25:10] Using gulpfile /code/gulpfile.mjs
[16:25:10] Starting 'build'...
[16:25:10] Starting 'css'...
[16:25:14] Finished 'css' after 4.95 s
[16:25:14] Starting 'hash'...
[16:25:21] Finished 'hash' after 6.64 s
[16:25:21] Finished 'build' after 12 s
Done in 13.18s.
vagrant@debian11:/code$ ls -l assets/build
total 4
drwxrwxr-x 1 vagrant www-data 4096 Apr 6 16:25 css
vagrant@debian11:/code$ ls -l public/static
total 4
drwxrwxr-x 1 vagrant www-data 4096 Apr 6 16:24 css
Before you open this issue, please complete the following tasks:
What were you expecting to happen?
Gulp.dest
copies files between filesystems as it happened in v4.What actually happened?
No files are copied, but they are present in intermediate directory.
Please give us a sample of your gulpfile
Terminal output / screenshots
Please provide the following information:
node -v
): v18.20.1npm -v
): 10.5.0gulp -v
): 5.0.0 (CLI 3.0.0)Additional information
Changing
tmp: path.join(os.tmpdir(), 'gulp-build-cache'),
totmp: 'assets/build',
results in working script and files are properly copied from intermediate directory to final one./tmp
and the/code
(cwd
in whichgulp
is executed) are on different filesystems.