S
S
Someone Nektovich2018-02-28 23:36:27
bash
Someone Nektovich, 2018-02-28 23:36:27

Why doesn't the symlink redirect to the executable (without throwing an error)?

I want to open files from the Git Bash console using the Sublime editor.
Created a symlink and placed it in the directory specified in $PATH:
5a970f938fec4874097294.png
Like this:

ln -s "e:/SublimeText3/subl.exe" C:/Users/ART21/bin/

As a result, a non-empty symlink was created for the specified directory. Closed and opened the console.
However, calling subl does not lead to anything (no errors, and the editor does not open):
5a97110d49464155462320.png
if you open it manually, for example: e:/SublimeText3/subl.exe .- everything works. (The editor will open the current directory)
Tell me what could be the catch?
PS Follow-up question:
Why can the $PATH variable list directories that
I don't think Windows has. Like "usr/local/bin"?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2018-03-01
@AmiAkari

1. A path starting with C: should not work in git-bash, as in Linux there should not be colons in the path.
2. Regarding your question - git-bash mounts /usr/local/bin and other folders because POSIC has an accepted standard for a directory tree, AND git-bash mimics it.
3. The link is not good. Working with libraries in windows is not organized the same way as in windows, so making a link to a binary means that it will not be launched from its own directory, where there are also other resources, but from a directory with a link. There may be a mistake.
4. It is much better to add a directory with subline to PATH, like this:
PATH=$PATH:"e:/SublimeText3/"
and you can call sublime

K
key don, 2018-03-01
@keydon2

Because windows users must suffer :(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question