Open p3r7 opened 10 months ago
i don't really have a strong opinion here – i've never used util.scandir
on norns or seamstress. i would like not to make seamstress depend on coreutils, although i suppose it's not onerous.
seamstress could definitely expose the current os itself, but calling uname
is right there already...
hey!
the issue
so
util.scandir
relies onls
to list files in a directory. but it uses the--group-directories-first
option (src) to have directories listed before regular files in the output,. but this flag is only available for the GNU version ofls
(OS X comes w/ BSD's version).paths of resolution
i see 3 ways to fix this:
--group-directories-first
flag (meh as we'd loose feature parity w/ norns)coreutils
be a dependency to seamstress on OS X and callgls
instead ofls
find
(per this rec)2 & 3 both require to be able to test the current OS in the Lua layer. idk if seamstress exposes a global w/ that info already or if this is something that would need to be added.
also this fix would be back-ported to norns itself (for allowing to run
norns-desktop
on OS X, which is something that got discussed recently).