Skip to content
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

Behavior of file.base when set to file.cwd? #129

Closed
phated opened this issue Mar 2, 2017 · 2 comments
Closed

Behavior of file.base when set to file.cwd? #129

phated opened this issue Mar 2, 2017 · 2 comments
Projects

Comments

@phated
Copy link
Member

phated commented Mar 2, 2017

I just ran into this while working on vinyl-sourcemap: if someone does file.base = file.cwd, what should the resulting behavior be? Currently we don't do anything due to the check at https://github.com/gulpjs/vinyl/blob/master/index.js#L215

cc @darsain

@darsain
Copy link
Contributor

darsain commented Mar 4, 2017

If base after normalization equals cwd, it should result in delete this._base; so the getter can default to this._cwd. Not doing anything there is definitely a bug.

@phated
Copy link
Member Author

phated commented Mar 6, 2017

@darsain cool, thanks for looking at that. It felt like a bug but I wasn't sure.

@phated phated added this to TODO in v4 Mar 8, 2017
@phated phated closed this as completed in 07e4093 Apr 18, 2017
@phated phated moved this from TODO to Done in v4 Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v4
  
Done
Development

No branches or pull requests

2 participants