depot/third_party/nixpkgs/pkgs/desktops/deepin/go-package/dde-daemon/0002-dont-set-PATH.patch

41 lines
1.2 KiB
Diff
Raw Normal View History

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