dokku / plugn

Hook system that lets users extend your application with plugins
MIT License
82 stars 22 forks source link

`--committish` flag for `plugin:install` returns with non-zero exit code #120

Closed IgnisDa closed 5 months ago

IgnisDa commented 1 year ago

Description of problem

I tried installing a specific commit for a plugin via:

dokku plugin:install https://github.com/IgnisDa/dokku-edgedb.git --committish 71d116ef604baada41194146b081d4fa268760b7

But it exits with a non-zero code:

image

Steps to reproduce

  1. dokku plugin:install https://github.com/IgnisDa/dokku-edgedb.git --committish 71d116ef604baada41194146b081d4fa268760b7

Additional information

dokku version 0.30.2

Notes

  1. I tried this with the official postgres plugin and it works fine.
josegonzalez commented 1 year ago

Truncated trace mode output:

# dokku --trace plugin:install https://github.com/IgnisDa/dokku-edgedb.git --committish 71d116ef604baada41194146b081d4fa268760b7

...

-----> Plugin edgedb enabled
+ [[ -n 71d116ef604baada41194146b081d4fa268760b7 ]]
+ update_plugin edgedb 71d116ef604baada41194146b081d4fa268760b7
+ declare 'desc=update plugin'
+ local PLUGIN=edgedb
+ local PLUGIN_COMMITTISH=71d116ef604baada41194146b081d4fa268760b7
+ [[ ! -e /var/lib/dokku/plugins/available/edgedb ]]
+ plugn update edgedb 71d116ef604baada41194146b081d4fa268760b7
root@dokku:~# echo $?
1

Seems like plugn update is failing, not sure why just yet.

mattmess1221 commented 7 months ago

The plugin uses main as the default branch instead of master. Unfortunately, the master branch is hard-coded here. https://github.com/dokku/plugn/blob/76f8bff62671e06de058ca8abf252cc973ac84ff/bashenv/plugn.bash#L59

This should probably be a simple git pull or even a git fetch without needing to checkout master.

josegonzalez commented 5 months ago

@killjoy1221 I think this can be closed right?

mattmess1221 commented 5 months ago

Yes, I think it can. Fixed in #141