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

Windows: execPath is not assigned resolved symbolic link #851

Closed
am11 opened this issue Feb 15, 2015 · 3 comments
Closed

Windows: execPath is not assigned resolved symbolic link #851

am11 opened this issue Feb 15, 2015 · 3 comments

Comments

@am11
Copy link

am11 commented Feb 15, 2015

On Linux/Mac:

# this is bash
# nvm install iojs-v1.2.0
nvm use iojs-v1.2.0
cd /tmp
ln -s ~/.nvm/versions/iojs/v0.12.0/bin/iojs greatTool
./greatTool -p process.execPath
# gives
/home/vagrant/.nvm/versions/node/v0.12.0/bin/node

On WindOS:

:: this is cmd
:: nvmw install iojs-v1.2.0
nvmw use iojs-v1.2.0
cd \temp
mklink greatTool.exe %userprofile%\.nvmw\iojs\v1.2.0\iojs.exe 
.\greatTool -p process.execPath
:: gives
C:\temp\greatTool.exe

Why the disparity when fs.realpathSync is capable of resolving symbolic link on Windows?

@silverwind
Copy link
Contributor

Definitely looks like a bug to me. I'm also curious if fs.lstat and fs.lstatSync handle Windows symlinks correctly.

am11 added a commit to am11/node-sass that referenced this issue Feb 15, 2015
On Windows, process.execPath does not
get resolved symlink path. This commit
fixes the issue.

Related Issue: nodejs/node#851.
PR URL: sass#668.
am11 added a commit to am11/node-sass that referenced this issue Feb 15, 2015
On Windows, process.execPath does not
get resolved symlink path. This commit
fixes the issue.

Related Issue: nodejs/node#851.
PR URL: sass#668.
am11 added a commit to am11/node-sass that referenced this issue Feb 15, 2015
On Windows, process.execPath does not
get resolved symlink path. This commit
fixes the issue.

Related Issue: nodejs/node#851.
PR URL: sass#668.
am11 added a commit to am11/node-sass that referenced this issue Feb 15, 2015
On Windows, process.execPath does not
get resolved symlink path. This commit
fixes the issue.

Related Issue: nodejs/node#851.
PR URL: sass#668.
@piscisaureus
Copy link
Contributor

I guess behavior could be brought in line with unix.
It should go into libuv: https://github.com/libuv/libuv/blob/f2bb8d394c06d06ee45e884600466321455751b6/src/win/util.c#L110

@am11
Copy link
Author

am11 commented Feb 16, 2015

Thanks for the link! I will post this issue in libuv issue tracker.

BTW I saw the notorious goto statement on line 152 in that libuv code file. 😮

@am11 am11 closed this as completed Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants