Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,14 @@ func IsProd() bool {
}

func getAppPath() (string, error) {
var appPath string
appPath := AppPath
if giteaAppPath, ok := os.LookupEnv("GITEA_APP_PATH"); ok {
appPath = giteaAppPath
}
if appPath != "" {
return appPath, nil
}

var err error
if IsWindows && filepath.IsAbs(os.Args[0]) {
appPath = filepath.Clean(os.Args[0])
Expand Down
1 change: 1 addition & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ environment:
GITEA_WORK_DIR: "$SNAP_COMMON"
GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
GITEA_APP_PATH: "$(echo \"$SNAP/$SNAP_NAME\"|sed \"s/$SNAP_REVISION/current/\")"

apps:
gitea:
Expand Down