Closed Tashows closed 1 year ago
This code is essentially unmaintained, so honestly I don't know what should happen here.
I ended up just being aware of when I use any of these flags and always moving them to expected position in the command issued to run via the daemon. Seems to work so far.
https://github.com/dokku/dokku-daemon/blob/cde518d46c8cf3e0186bbbaa5848a5fc3586612a/bin/dokku-daemon#L81
I am not very familiar with shell scripts, but after trying to debug this it seems that if the input is
apps:destroy app_name --force
then it usesshift
and the output isapp_name --force
. This in turn is recognized as an invalid command. While it is invalid, that is not the expected behavior for that function, or at least not expected behavior for that specific command syntax. Maybe it's supposed to catch--force
flags from other commands? Should it also check if the current flag is the first argument? Or should these specific flags always be sent as the first argument (in which case this is totally expected)?Would be happy to try and provide a PR, but I first want to make sure I understand the cases expected to be handled by that function.