diff options
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/engine.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 97f5e848cc..880e464036 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
@@ -244,8 +244,13 @@ class Disk: | |||
244 | self._psector_size = None | 244 | self._psector_size = None |
245 | self._ptable_format = None | 245 | self._ptable_format = None |
246 | 246 | ||
247 | # find parted | 247 | # read paths from $PATH environment variable |
248 | self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/" | 248 | # if it fails, use hardcoded paths |
249 | try: | ||
250 | self.paths = os.environ['PATH'] | ||
251 | except KeyError: | ||
252 | self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/" | ||
253 | |||
249 | if native_sysroot: | 254 | if native_sysroot: |
250 | for path in self.paths.split(':'): | 255 | for path in self.paths.split(':'): |
251 | self.paths = "%s%s:%s" % (native_sysroot, path, self.paths) | 256 | self.paths = "%s%s:%s" % (native_sysroot, path, self.paths) |