BlueprintFramework / framework

Powerful, fast and developer-friendly extension framework for Pterodactyl. Utilize extension APIs, inject HTML, modify stylesheets, package extensions and so much more.
https://blueprint.zip
MIT License
216 stars 23 forks source link

Blueprint should not assume certain things about the environment #29

Open itsvic-dev opened 5 months ago

itsvic-dev commented 5 months ago
prplwtf commented 5 months ago

In all honestly, I doubt people would run Pterodactyl on NixOS.

itsvic-dev commented 5 months ago

In all honestly, I doubt people would run Pterodactyl on NixOS.

I do -- but that's not the point. Point is, Blueprint shouldn't assume certain things about the environment. Another one is, Blueprint assumes that www-data is the owner of the panel directory. Doesn't break anything, but is annoying nonetheless.

Ahwxorg commented 5 months ago

Works on my machine

Ahwxorg commented 5 months ago

In all seriousness:

@prplwtf we/you could just add a simple if-statement, or tell people that NixOS is unsupported? Also possible to make the directories a variable and define the variable using a interactive script?

prplwtf commented 5 months ago

Non-standard directory support has been implemented since ages ago.

Non-standard file ownership has been implemented recently, but is waiting for the next release.

itsvic-dev commented 5 months ago

Non-standard directory support has been implemented since ages ago.

It's a bit wonky in my experience. When running with _FOLDER set, it breaks. Running it a second time, with or without _FOLDER, gets it to actually install. This still doesn't address my initial complaint that the directory can change, and you should avoid absolute symlinks.

Non-standard file ownership has been implemented recently, but is waiting for the next release.

Glad to hear that.

we/you could just add a simple if-statement, or tell people that NixOS is unsupported?

This isn't a NixOS-specific issue. If the user running Blueprint does not have write permissions to /usr/local/bin, it will also fail to install the blueprint tool, as was the case for me as I was running it as myself, not as root.

prplwtf commented 5 months ago

We could switch to a .env-like config file for Blueprint which would store settings like these in a readable manner:

For the "blueprint" command issue, we could just add a statement to check from a list of directories, and if it exists, place it in there.

prplwtf commented 3 months ago

_FOLDER functionality has now been removed in commit 6faa0c3 in favor of :sparkles: sed commands :sparkles:.