add command does not write posix path for symlink on Windows
See original GitHub issueSymlinks in a git repository must be expressed using a posix path (the path separator should be a forward slash) (e.g., dir/file
). On Windows, the add command in isomorphic-git writes the path using backslash as the path separator. This happens because isomorphic-git uses fs.readlink to read the link target. On Windows, this function returns the path using backslash as the path separator (e.g., dir\file
). isomorphic-git does not correct this, and ends up writing the non-posix path into the blob object.
This can be fixed by checking for the existence of backslashs in the return value of fs.readlink and correcting them to forward slashes.
Platform: Node.js isomorphic-git version: 1.8.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Git symbolic links in Windows - Stack Overflow
The add-symlink alias now works more like ln(1) and can be used from any directory in the repository, not just the repository's root ......
Read more >Symlinks on the mounted Windows directories are not ...
I created a symbolic link to a file on a mounted Windows directory in BASH. In the command prompt CMD.exe, the file appeared...
Read more >The Complete Guide to Creating Symbolic Links (aka ...
You can create symbolic links using the mklink command in a Command Prompt window as Administrator. To open one, locate the “Command Prompt” ......
Read more >Naming Files, Paths, and Namespaces - Win32 apps
Without a symlink, a specified device "Xxx" will not be available to any Windows application using Win32 namespace conventions as described ...
Read more >Command Line Basics: Symbolic Links - DigitalOcean
This guide provides an overview of what symbolic links are and how to to create them from a Linux command line using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
🎉 This issue has been resolved in version 1.9.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Ah, great point. That sounds very plausible.