tmedwards / tweego

Tweego is a free (gratis and libre) command line compiler for Twine/Twee story formats, written in Go.
https://www.motoslave.net/tweego
BSD 2-Clause "Simplified" License
124 stars 23 forks source link

Symlinked binary on Mac doesn't find story formats in binary location #55

Closed Ahmed-M-Tawfik closed 1 year ago

Ahmed-M-Tawfik commented 1 year ago

Describe the bug When symlinked, tweego cannot find accompanying storyformats folder in binary directory.

To Reproduce I symlinked the tweego binary into /usr/local/bin from ~/Binaries/tweego-2.1.1-macos-x64 on MacOS 11.7.4 in zsh. When running from a random folder tweego --help or tweego -v etc, I get the following error: Story format search directories not found.

Changing directory into the tweego folder and running those commands produces the expected output (e.g. help docs). Commands don't work when I'm in ~/Binaries. Commands work after copying ~/Binaries/tweego-2.1.1-macos-x64/storyformats into ~/Binaries

Expected behavior Tweego should find the storyformats folder in its original directory regardless of working directory.

Screenshots

1 2 3 4

Testing with storyformats copied under ~/Binaries

5 6 7 8 9

Desktop (please complete the following information):

Workaround Use TWEEGO_PATH:

Screenshot 2023-06-15 at 00 04 21
tmedwards commented 1 year ago

Duplicate of issue #13