question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add command does not write posix path for symlink on Windows

See original GitHub issue

Symlinks 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:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
isomorphic-git-botcommented, Jul 5, 2021

🎉 This issue has been resolved in version 1.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

0reactions
mojavelinuxcommented, Aug 17, 2022

Ah, great point. That sounds very plausible.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found