Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Absolute paths in glob not working #229

@szymonkups

Description

@szymonkups

There is an issue when using absolute paths as globs in gulp-watch.
Example:

var gulp = require('gulp'),
    watch = require('gulp-watch'),
    glob = '/home/username/tmp/client/js/**/*.js';

const opts = { };

gulp.task('stream', function () {
    return gulp.src(glob, opts)
        .pipe(watch(glob, opts))
        .pipe(gulp.dest('build'));
});

Gulpfile is located under: /home/username/tmp/gulpfile.js.
This was working without problems in 4.3.5, and was broken by this commit. After the change matching of absolute glob and relative file path is not correct and glob is always -1.
Please provide more information about why this check is needed in that situation.

Thanks for the great work on the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions