mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
misc: Fetch environment from launch context before spawn_async()
This will fetch the right environment for the launched application,
without using GNOME Shell's environment.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>
(cherry picked from commit 7b1223a254)
This commit is contained in:
parent
60ce3b23d8
commit
9146293b26
1 changed files with 2 additions and 1 deletions
|
|
@ -111,8 +111,9 @@ function spawnApp(argv) {
|
|||
function trySpawn(argv) {
|
||||
var success_, pid;
|
||||
try {
|
||||
const launchContext = global.create_app_launch_context(0, -1);
|
||||
[success_, pid] = GLib.spawn_async(
|
||||
null, argv, null,
|
||||
null, argv, launchContext.get_environment(),
|
||||
GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
|
||||
() => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue