Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
djblue committed Dec 22, 2024
1 parent 0457f4e commit 88c0c86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/portal/runtime/browser.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@
(println "Goto" url "to view portal ui."))
:cljr
(condp identical? (.Platform Environment/OSVersion)
PlatformID/Win32NT (shell/sh "cmd" "/c" "start" url)
PlatformID/Win32Windows (shell/sh "cmd" "/c" "start" url)
PlatformID/Win32NT (shell/spawn "cmd.exe" "/c" "start" url)
PlatformID/Win32Windows (shell/spawn "cmd.exe" "/c" "start" url)
PlatformID/Unix (if (RuntimeInformation/IsOSPlatform OSPlatform/OSX)
(shell/sh "open" url)
(shell/sh "xdg-open" url))
(shell/spawn "open" url)
(shell/spawn "xdg-open" url))
(println "Goto" url "to view portal ui.")))))

#?(:clj (defn- random-uuid [] (java.util.UUID/randomUUID)))
Expand Down
3 changes: 2 additions & 1 deletion src/portal/runtime/shell.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
(.on ps "close" resolve))))
:cljr
(future
(let [{:keys [exit err out]} (apply shell/sh bin args)]
(let [{:keys [exit err out] :as x} (apply shell/sh bin args)]
(prn [::spawn bin args x])
(when-not (zero? exit)
(prn (into [bin] args))
(println err out))))))
Expand Down

0 comments on commit 88c0c86

Please sign in to comment.