Skip to content

Commit cb2dfe1

Browse files
committed
Add some env vars for a few default overrides
1 parent e2def95 commit cb2dfe1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

beef.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ def _settable_parser(defaults: bool = True) -> argparse.ArgumentParser:
261261
(
262262
('--user-data',),
263263
{
264-
'default': pathlib.Path.home() / 'vms' / 'user-data',
264+
'default': os.getenv(
265+
'BEEF_USER_DATA',
266+
pathlib.Path.home() / 'vms' / 'user-data',
267+
),
265268
'help': 'Path to cloud-init user_data file',
266269
'type': pathlib.Path,
267270
},
@@ -313,7 +316,10 @@ def parse_args(
313316
storage_parser = argparse.ArgumentParser(add_help=False)
314317
storage_parser.add_argument(
315318
'--storage',
316-
default=pathlib.Path.home() / 'vms' / 'storage',
319+
default=os.getenv(
320+
'BEEF_STORAGE',
321+
pathlib.Path.home() / 'vms' / 'storage',
322+
),
317323
type=pathlib.Path,
318324
help='Path to vmstorage dir. Default: %(default)s',
319325
)

0 commit comments

Comments
 (0)