athena-oss / athena

An automation platform with a plugin architecture that allows you to easily create and share services.
https://athena-oss.github.io/athena/
Apache License 2.0
92 stars 25 forks source link

improve multi cmd_dir handling #9

Closed ghost closed 8 years ago

ghost commented 8 years ago

the test if a command exists in a directory is now using an explicit glob pattern which doesn't match as well on similar commands

example situation:

mkdir /tmp/cmd1
mkdir /tmp/cmd2

touch /tmp/cmd1/my-command-special_pre.sh
touch /tmp/cmd2/my-command_pre.sh

athena.plugin.set_plg_cmd_dir "/tmp/cmd1:/tmp/cmd2"

calling it later via

athena myplugin my-command

will end up with

Unrecognized command or plugin 'my-command'.