From 0a2ee907f7b927e29fa6bf4362479788b1019a00 Mon Sep 17 00:00:00 2001 From: Daniel Rapp Date: Fri, 16 Aug 2019 14:07:41 -0600 Subject: [PATCH] Support {home} replacement on run-image --- README.md | 3 ++- scripts/run-image | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e89be49..104b01f 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,8 @@ variable replacement designations of the form `{var}`. The supported variables * `project_root` - will be replaced with the root directory name of the project * `user` - will be replaced with the user name of the user running the command -* `project` - replace with project namge +* `project` - will be replaced with project name +* `home` - will be replaced with the user's home directory ### Image Push Replacement Variables diff --git a/scripts/run-image b/scripts/run-image index 7c1a269..6b9a637 100755 --- a/scripts/run-image +++ b/scripts/run-image @@ -66,7 +66,8 @@ def run(mode, image_name, image_tag, **kwargs): volumes = kwargs['volumes'].format( project_root=get_root_dir(), user=user, - project=os.path.split(get_root_dir())[1] + project=os.path.split(get_root_dir())[1], + home=os.path.expanduser("~") ) volumes = os.path.expandvars(volumes)