BallAerospace / COSMOS

Ball Aerospace COSMOS
https://ballaerospace.github.io/cosmos-website/
Other
360 stars 129 forks source link

Building Plugins in 5.0.5 #1740

Closed agcucos closed 2 years ago

agcucos commented 2 years ago

With the latest edition of COSMOS, it no longer appears possible to use the plugin generation function, since running the command "path/to/cosmos/directory/cosmos-control.sh cosmos generate plugin VERSION=X.X.X" invariably results in the error "./.env: No such file or directory". This seems to be a result of the decision to use relative pathing in this file, rather than locating the script directory and building an absolute path from that. (Obviously unlike when starting cosmos, I cannot run this command from the cosmos directory, as this is not where I wish to build my plugin)

Is there an alternative method to generate plugins that we should be using that avoids this issue, or did I miss a step when setting up that would resolve this issue?

Thanks for the help!

jmthomas commented 2 years ago

This is indeed a bug. It works in Windows but not in the shell script. We're going to be doing a lot more testing on Linux in the near future so hopefully we'll catch stuff like this going forward. Thanks!

For now update cosmos-control.sh line 39 to be: . "$(dirname -- "$0")/.env"

jmthomas commented 2 years ago

Fixed by c14895846