Skip to content

Wrong symlinks relative path for nested files #321

Open
@p5yk0

Description

@p5yk0

Let's say we have this stucture :

|- dest
|- src
   |- Gulpfile.js
   |- app
      |- index.js
      |- module
         |- a.js

I want to symlink all files in src/app into dest and keep the app structure :

gulp
 .src( '/absolute/path/to/src/app/**', { nodir:true } )
 .pipe(
     gulp.symlink(
         'absolute/path/to/dest',
         { overwrite:true, relativeSymlinks:true } )
  );

Now in folder dest I have :

index.js -> '../src/app/index.js'
module/

That is fine.

But in dest/module I have :

a.js -> ../app/module/a.js

instead of

a.js -> ../../app/module/a.js

It seems that the directories presents in file.relative are ignored.
Only the files in the root src directory have working symlinks. Symlinks created for src nested files are broken.

Is it a bug or I'm somehow missing something ?

With Gulp
CLI version: 2.3.0
Local version: 4.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions