gulpjs / gulpjs/vinyl-fs

Wrong symlinks relative path for nested files

Open
#321 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
973
Forks
154
PR merge metrics
No merged PRs in 30d

Description

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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.