mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
23 lines
719 B
Diff
23 lines
719 B
Diff
|
Look for required tools in $PATH instead of just a handful locations.
|
||
|
|
||
|
diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py
|
||
|
index b637f023a4..14516e1c65 100644
|
||
|
--- a/src/ceph-volume/ceph_volume/util/system.py
|
||
|
+++ b/src/ceph-volume/ceph_volume/util/system.py
|
||
|
@@ -33,14 +33,7 @@ def generate_uuid():
|
||
|
|
||
|
def which(executable):
|
||
|
"""find the location of an executable"""
|
||
|
- locations = (
|
||
|
- '/usr/local/bin',
|
||
|
- '/bin',
|
||
|
- '/usr/bin',
|
||
|
- '/usr/local/sbin',
|
||
|
- '/usr/sbin',
|
||
|
- '/sbin',
|
||
|
- )
|
||
|
+ locations = os.getenv('PATH').split(':')
|
||
|
|
||
|
for location in locations:
|
||
|
executable_path = os.path.join(location, executable)
|