Skip to content

Commit f21dcef

Browse files
authored
Fix issue trying to start profiles (#23)
Abrupt stops of `qubesome start` leave behind lingering files which may lead `qubesome` to think the profile is still running. To overcome this issue, a new check was introduced to confirm that the container is running before returning an error.
2 parents af6ac4a + 6fce34d commit f21dcef

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

.github/dependabot.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
groups:
8+
golang.org:
9+
patterns:
10+
- "golang.org/*"
711

812
- package-ecosystem: "github-actions"
913
directory: "/"
1014
schedule:
1115
interval: "monthly"
16+
groups:
17+
github-actions-updates:
18+
patterns:
19+
- "*"

.obs/workflows.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,3 @@ testbuild:
1818
- aarch64
1919
filters:
2020
event: pull_request
21-
22-
rebuild:
23-
steps:
24-
- trigger_services:
25-
project: home:pjbgf:devel:languages:go:unstable
26-
package: qubesome
27-
- rebuild_package:
28-
project: home:pjbgf:devel:languages:go:unstable
29-
package: qubesome
30-
filters:
31-
event: push
32-
branches:
33-
only:
34-
- main

internal/profiles/profiles.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ func StartFromGit(runner, name, gitURL, path, local string) error {
8686
ln := files.ProfileConfig(name)
8787

8888
if _, err := os.Lstat(ln); err == nil {
89-
// Wayland is not cleaning up profile state after closure.
90-
if !strings.EqualFold(os.Getenv("XDG_SESSION_TYPE"), "wayland") {
89+
if container.Running(runner, fmt.Sprintf(ContainerNameFormat, name)) {
9190
return fmt.Errorf("profile %q is already started", name)
9291
}
92+
9393
if err = os.Remove(ln); err != nil {
9494
return fmt.Errorf("failed to remove leftover profile symlink: %w", err)
9595
}

0 commit comments

Comments
 (0)