depot/third_party/nixpkgs/pkgs/desktops/deepin/go-package/dde-daemon/0002-dont-set-PATH.patch
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

40 lines
1.2 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 7fe41aac7c31f6143b5f5887dbefa41fdf4c252b Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Wed, 5 Apr 2023 23:37:49 +0800
Subject: [PATCH 2/4] dont-set-PATH
---
bin/dde-system-daemon/main.go | 4 ----
grub2/modify_manger.go | 1 -
2 files changed, 5 deletions(-)
diff --git a/bin/dde-system-daemon/main.go b/bin/dde-system-daemon/main.go
index 03d2a415..cf92f065 100644
--- a/bin/dde-system-daemon/main.go
+++ b/bin/dde-system-daemon/main.go
@@ -77,10 +77,6 @@ func main() {
// fix no PATH when was launched by dbus
if os.Getenv("PATH") == "" {
logger.Warning("No PATH found, manual special")
- err = os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
- if err != nil {
- logger.Warning(err)
- }
}
// 系统级服务无需设置LANG和LANGUAGE保证翻译不受到影响
diff --git a/grub2/modify_manger.go b/grub2/modify_manger.go
index a811770b..30e9561e 100644
--- a/grub2/modify_manger.go
+++ b/grub2/modify_manger.go
@@ -21,7 +21,6 @@ const (
)
func init() {
- _ = os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
}
type modifyManager struct {
--
2.39.2