robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
123 stars 12 forks source link

Script won't find proper Require scripts, without navigating to that folder first #97

Closed kasselvania closed 9 months ago

kasselvania commented 10 months ago

seamstress -s ~/seamstress/bitwig_seamstress/refactor_bitwig.lua

won't find the proper dependency files within that directory.

I must cd into the proper directory, and THEN launch the seamstress script for the dependencies to be collected.

p3r7 commented 10 months ago

i did part of this code in seamstress. i could take a look at that one.

p3r7 commented 10 months ago

ok, i see what is wrong.

this is not really a seamstress bug.

you use require and not include for your libs.

require only allows requiring libs from a limited set of folders (including "current shell folder"). it is a standard Lua function that we try to not mess too much w/.

include is something borrowed from norns that is smarter at dealing with relative paths. it is the prefered one to use for your script's own lib.