]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Use expanduser instead of HOME
authorSimon Glass <sjg@chromium.org>
Wed, 19 Apr 2023 21:21:14 +0000 (15:21 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Apr 2023 17:49:00 +0000 (11:49 -0600)
There may not be a HOME environment variable, so use the os.expanduser()
function instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/cmdline.py

index 4b875a9dcda35eb38e7eaa413796cdcad21487d9..9632ec115e5daf406f8ad5db984ae82d97030acc 100644 (file)
@@ -95,7 +95,7 @@ controlled by a description in the board device tree.'''
     parser.add_argument('-H', '--full-help', action='store_true',
         default=False, help='Display the README file')
     parser.add_argument('--tooldir', type=str,
-        default=os.path.join(os.getenv('HOME'), '.binman-tools'),
+        default=os.path.join(os.path.expanduser('~/.binman-tools')),
         help='Set the directory to store tools')
     parser.add_argument('--toolpath', type=str, action='append',
         help='Add a path to the list of directories containing tools')