Skip to content

Commit 4b05d03

Browse files
authored
Merge branch 'master' into master
2 parents 0900a37 + c08903e commit 4b05d03

File tree

3 files changed

+27
-31
lines changed

3 files changed

+27
-31
lines changed

.goreleaser.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,3 @@ snapshot:
3636
changelog:
3737
use: github-native
3838
sort: asc
39-
brews:
40-
-
41-
# Repository to push the tap to.
42-
repository:
43-
owner: jesseduffield
44-
name: homebrew-lazygit
45-
46-
# Your app's homepage.
47-
# Default is empty.
48-
homepage: 'https://github.com/jesseduffield/lazygit/'
49-
50-
# Your app's description.
51-
# Default is empty.
52-
description: 'A simple terminal UI for git commands, written in Go'
53-
54-
# # Packages your package depends on.
55-
# dependencies:
56-
# - git
57-
# - zsh
58-
# # Packages that conflict with your package.
59-
# conflicts:
60-
# - svn
61-
# - bash

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,21 @@ and the git version which builds from the most recent commit.
283283
Instruction of how to install AUR content can be found here:
284284
<https://wiki.archlinux.org/index.php/Arch_User_Repository>
285285

286-
### Fedora and RHEL
286+
### Fedora / Amazon Linux 2023 / CentOS Stream
287287

288-
Packages for Fedora/RHEL and CentOS Stream are available via [Copr](https://copr.fedorainfracloud.org/coprs/atim/lazygit/) (Cool Other Package Repo).
288+
Packages for Fedora, Amazon Linux 2023 and CentOS Stream are available via
289+
[Copr](https://copr.fedorainfracloud.org/coprs/dejan/lazygit/) (Cool Other Package Repo).
289290

290291
```sh
291-
sudo dnf copr enable atim/lazygit -y
292+
sudo dnf copr enable dejan/lazygit
292293
sudo dnf install lazygit
293294
```
294295

296+
These packages are built using the RPM spec file located here: https://codeberg.org/dejan/rpm-lazygit
297+
298+
You should be able to build RPMs for Fedora 41 or older, and other Fedora derivatives using the
299+
SRPM (Source RPM) file that you can grab from the latest COPR build.
300+
295301
### Solus Linux
296302

297303
```sh

pkg/app/entry_point.go

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
_ "net/http/pprof"
99
"os"
1010
"os/exec"
11+
"os/user"
1112
"path/filepath"
1213
"runtime"
1314
"runtime/debug"
@@ -124,11 +125,7 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
124125
os.Exit(0)
125126
}
126127

127-
tmpDirBase := filepath.Join(os.TempDir(), "lazygit")
128-
if err := os.MkdirAll(tmpDirBase, 0o700); err != nil {
129-
log.Fatal(err.Error())
130-
}
131-
tempDir, err := os.MkdirTemp(tmpDirBase, "")
128+
tempDir, err := os.MkdirTemp(getTempDirBase(), "lazygit-*")
132129
if err != nil {
133130
log.Fatal(err.Error())
134131
}
@@ -314,3 +311,19 @@ func getGitVersionInfo() string {
314311
gitVersion := strings.Trim(strings.TrimPrefix(string(stdout), "git version "), " \r\n")
315312
return gitVersion
316313
}
314+
315+
func getTempDirBase() string {
316+
tempDir := os.TempDir()
317+
318+
user, err := user.Current()
319+
if err != nil || user.Uid == "" {
320+
return tempDir
321+
}
322+
323+
tmpDirBase := filepath.Join(tempDir, "lazygit-"+user.Uid)
324+
if err := os.MkdirAll(tmpDirBase, 0o700); err != nil {
325+
return tempDir
326+
}
327+
328+
return tmpDirBase
329+
}

0 commit comments

Comments
 (0)