File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ type releaseResponse struct {
5656
5757// StaticDir resolves the directory that stores the management control panel asset.
5858func StaticDir (configFilePath string ) string {
59+ if override := strings .TrimSpace (os .Getenv ("MANAGEMENT_STATIC_PATH" )); override != "" {
60+ cleaned := filepath .Clean (override )
61+ if strings .EqualFold (filepath .Base (cleaned ), managementAssetName ) {
62+ return filepath .Dir (cleaned )
63+ }
64+ return cleaned
65+ }
66+
5967 configFilePath = strings .TrimSpace (configFilePath )
6068 if configFilePath == "" {
6169 return ""
@@ -74,6 +82,14 @@ func StaticDir(configFilePath string) string {
7482
7583// FilePath resolves the absolute path to the management control panel asset.
7684func FilePath (configFilePath string ) string {
85+ if override := strings .TrimSpace (os .Getenv ("MANAGEMENT_STATIC_PATH" )); override != "" {
86+ cleaned := filepath .Clean (override )
87+ if strings .EqualFold (filepath .Base (cleaned ), managementAssetName ) {
88+ return cleaned
89+ }
90+ return filepath .Join (cleaned , ManagementFileName )
91+ }
92+
7793 dir := StaticDir (configFilePath )
7894 if dir == "" {
7995 return ""
You can’t perform that action at this time.
0 commit comments