[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: Allow running without PATH being set

Nicolas Dandrimont (@olasd) gitlab at salsa.debian.org
Thu Nov 14 15:14:10 GMT 2024



Nicolas Dandrimont pushed to branch develop at Debian / piuparts


Commits:
df3833c8 by Jochen Sprickerhof at 2024-11-14T15:51:58+01:00
Allow running without PATH being set

- - - - -
36671787 by Nicolas Dandrimont at 2024-11-14T15:14:04+00:00
Merge branch 'fix_path' into 'develop'

Allow running without PATH being set

See merge request debian/piuparts!71
- - - - -


1 changed file:

- piuparts.py


Changes:

=====================================
piuparts.py
=====================================
@@ -3630,8 +3630,9 @@ def main():
 
     # check if user has root privileges
     if os.getuid():
-        path_env = os.environ["PATH"].split(":")
-        for d in ("/usr/sbin", "/sbin"):
+        default_path_entries = ("/usr/sbin", "/usr/bin", "/sbin", "/bin")
+        path_env = os.environ.get("PATH", ":".join(default_path_entries)).split(":")
+        for d in default_path_entries:
             if d not in path_env:
                 path_env.append(d)
         os.environ["PATH"] = ":".join(path_env)



View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/5ef7f91c2559c54cff9f9508d3ba201908777e40...36671787aaec637a1abc25ed61626cfa8ce52d07

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/-/compare/5ef7f91c2559c54cff9f9508d3ba201908777e40...36671787aaec637a1abc25ed61626cfa8ce52d07
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20241114/2e47e5a9/attachment-0001.htm>


More information about the Piuparts-devel mailing list