Author Topic: Soft linking to vs doesn't work  (Read 73 times)

astromme

  • Senior Community Member
  • Posts: 124
  • Hero Points: 1
Soft linking to vs doesn't work
« on: September 18, 2023, 06:12:59 pm »
As I called out here, https://community.slickedit.com/index.php/topic,19258.msg76910.html#msg76910 I'm running into an error when I try to use soft links.

Code: [Select]
stromme@WORK:~/bin$ ls -la
total 44
drwxrwxr-x  2 stromme stromme 4096 Sep 18 11:17 .
drwxr-x--- 37 stromme stromme 4096 Sep 18 11:50 ..
lrwxrwxrwx  1 stromme stromme   13 Oct 27  2022 Grep -> /usr/bin/grep
lrwxrwxrwx  1 stromme stromme   23 Aug 10 16:56 old-slickedit-dir -> /opt/slickedit-pro2021/
lrwxrwxrwx  1 stromme stromme   30 Sep 18 11:08 slickedit-dir -> /opt/slickedit-pro2023beta2qt/
lrwxrwxrwx  1 stromme stromme   28 Sep  5 12:59 slickedit-dir.old -> /opt/slickedit-pro2023beta2/
-rwxrwxr-x  1 stromme stromme   15 Jan 24  2023 ubuntu_version
lrwxrwxrwx  1 stromme stromme   20 Sep 18 11:09 vs -> slickedit-dir/bin/vs
lrwxrwxrwx  1 stromme stromme   24 Aug 10 16:56 vsdiff -> slickedit-dir/bin/vsdiff
-rwxr-xr-x  1 stromme stromme   38 Aug 10  2022 vs-git
lrwxrwxrwx  1 stromme stromme   25 Aug 10 16:56 vsmerge -> slickedit-dir/bin/vsmerge

I have ~/bin/ in my PATH.

When I try to create a new file:
Code: [Select]
stromme@WORK:~$ vs newfile
/home/stromme/bin/vs: 49: exec: slickedit-dir/bin/vs_exe: not found

Interestingly:
Code: [Select]
stromme@WORK:~$ cd bin
stromme@WORK:~/bin$ vs newfile
stromme@WORK:~/bin$

If I'm in the ~/bin directory, things seem to work.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1810
  • Hero Points: 151
Re: Soft linking to vs doesn't work
« Reply #1 on: September 18, 2023, 08:26:17 pm »
Reproduced, we need to resolve that link so it's not a relative path before we start .

I hacked together something quick if you want a workaround. I'll add something that's actually tested for the beta 3.  Changes to the first 3 lines of the vs script:
Code: [Select]
CPATH="`realpath \"$0\"`"
VS_LAUNCH_BIN_NAME="`basename \"$CPATH\"`"
VS_LAUNCH_BIN_PATH="`dirname \"$CPATH\"`"