Skip to content
This repository was archived by the owner on Aug 10, 2025. It is now read-only.

Commit d1bbcf3

Browse files
committed
Merge branch 'master' of https://github.com/equinoxhq/equinox into add-nix-flake
2 parents 0739007 + db234d6 commit d1bbcf3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/container/utils/exec.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## All the utilities for executing commands
2-
import std/[osproc, options, logging, strutils]
2+
import std/[os, osproc, options, logging, strutils]
33

44
proc readOutput*(bin: string, cmd: string): Option[string] =
55
let command = bin & ' ' & cmd
@@ -9,8 +9,8 @@ proc readOutput*(bin: string, cmd: string): Option[string] =
99

1010
some(res.output.strip())
1111

12-
proc runCmd*(bin: string, cmd: string): bool {.discardable.} =
13-
let command = bin & ' ' & cmd
12+
proc runCmd*(bin: string, cmd: string, resolve: bool = false): bool {.discardable.} =
13+
let command = (if resolve: findExe(bin) else: bin) & ' ' & cmd
1414
debug "runCmd(" & command & ')'
1515

1616
execCmd(command) == 0

src/equinox_gui.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ proc main() {.inline.} =
6060
of "mime-handler":
6161
let env = getXdgEnv(input)
6262
discard execCmd(
63-
"pkexec " & env.equinoxPath & " launch-game-uri " & input.arguments[0] & " --user:" &
63+
"pkexec".findExe & ' ' & env.equinoxPath & " launch-game-uri " & input.arguments[0] & " --user:" &
6464
env.user & " --uid:" & $getuid() & " --gid:" & $getgid() & " --wayland-display:" &
6565
env.waylandDisplay & " --xdg-runtime-dir:" & env.runtimeDir
6666
)

src/gui/onboard.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ proc waitForCommands*(env: XdgEnv, fd: cint) =
222222
env.equinoxPath & " init --xdg-runtime-dir:" & env.runtimeDir &
223223
" --wayland-display:" & env.waylandDisplay & " --user:" & env.user & " --uid:" &
224224
$getuid() & " --gid:" & $getgid(),
225+
resolve = true
225226
):
226227
fd.send(OnboardMagic.InitSuccess)
227228
else:
@@ -236,9 +237,10 @@ proc waitForCommands*(env: XdgEnv, fd: cint) =
236237
env.equinoxPath & " run --warmup --user:" & env.user & " --uid:" & $getuid() &
237238
" --gid:" & $getgid() & " --wayland-display:" & env.waylandDisplay &
238239
" --xdg-runtime-dir:" & getEnv("XDG_RUNTIME_DIR"),
240+
resolve = true
239241
)
240242
of OnboardMagic.StopContainer:
241-
discard runCmd("pkexec", env.equinoxPath & " halt --force")
243+
discard runCmd("pkexec", env.equinoxPath & " halt --force", resolve = true)
242244

243245
proc runOnboardingApp*(input: Input) =
244246
let pair = initIpcFds()

0 commit comments

Comments
 (0)