darktable-org / lua-scripts

155 stars 110 forks source link

tools which is being deprecated #369

Closed TurboGit closed 2 years ago

TurboGit commented 2 years ago

The following line: https://github.com/darktable-org/lua-scripts/blob/d609823491587de9a4a623ef6e7023930f884c91/lib/dtutils/file.lua#L194

Is raising an issue: /usr/bin/which: this version of which' is deprecated; usecommand -v' in scripts instead.

Indeed, recent Linux version have been deprecating which tool. The recommendation is to use command -v instead.

wpferguson commented 2 years ago

Got it. Thanks

TurboGit commented 2 years ago

I did not create a PR as I'm not sure how to test that and "command -v" is not an external tool so not sure either if it will work with popen().

wpferguson commented 2 years ago

My first thought was that I really need to finish migrating to 20.04. My second thought was how am I going to test this?:) I did a quick test on my Mac VM and it supports command -v as a built in. I think this will probably work fine because lua runs external commands in a shell, IIRC.

wpferguson commented 2 years ago

Preliminary testing looks like it'll work fine. Linux works and MacOS appears to work, but I have to do some work on the VM to get everything up to date and then I'll test again.