mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Merge pull request #716 from ManManavadaria/bugfix/index-out-of-range-713
Fix index out of range panic using containerID fallback (#713)
This commit is contained in:
commit
f4fc3669ca
3 changed files with 16 additions and 12 deletions
4
.github/workflows/cd.yml
vendored
4
.github/workflows/cd.yml
vendored
|
|
@ -14,9 +14,9 @@ jobs:
|
||||||
- name: Unshallow repo
|
- name: Unshallow repo
|
||||||
run: git fetch --prune --unshallow
|
run: git fetch --prune --unshallow
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: 1.24.x
|
||||||
- name: Run goreleaser
|
- name: Run goreleaser
|
||||||
uses: goreleaser/goreleaser-action@v1
|
uses: goreleaser/goreleaser-action@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Continuous Integration
|
name: Continuous Integration
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.21
|
GO_VERSION: 1.24
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -25,9 +25,9 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: 1.24.x
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -47,9 +47,9 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: 1.24.x
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -75,9 +75,9 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: 1.24.x
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -102,9 +102,9 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: 1.24.x
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,11 @@ func (c *DockerCommand) GetContainers(existingContainers []*Container) ([]*Conta
|
||||||
if name, ok := ctr.Labels["name"]; ok {
|
if name, ok := ctr.Labels["name"]; ok {
|
||||||
newContainer.Name = name
|
newContainer.Name = name
|
||||||
} else {
|
} else {
|
||||||
newContainer.Name = strings.TrimLeft(ctr.Names[0], "/")
|
if len(ctr.Names) > 0 {
|
||||||
|
newContainer.Name = strings.TrimLeft(ctr.Names[0], "/")
|
||||||
|
} else {
|
||||||
|
newContainer.Name = ctr.ID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
newContainer.ServiceName = ctr.Labels["com.docker.compose.service"]
|
newContainer.ServiceName = ctr.Labels["com.docker.compose.service"]
|
||||||
newContainer.ProjectName = ctr.Labels["com.docker.compose.project"]
|
newContainer.ProjectName = ctr.Labels["com.docker.compose.project"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue