diff --git a/buildrunner/steprunner/tasks/build.py b/buildrunner/steprunner/tasks/build.py index de695f57..ab469032 100644 --- a/buildrunner/steprunner/tasks/build.py +++ b/buildrunner/steprunner/tasks/build.py @@ -91,6 +91,8 @@ def __init__( ) for src_glob, dest_path in self.config.get('inject', {}).items(): + if not dest_path: + dest_path = '' _src_glob = self.step_runner.build_runner.global_config.to_abs_path(src_glob) xsglob = glob.glob(_src_glob) if not xsglob: @@ -102,7 +104,7 @@ def __init__( # Only one source - destination may be directory or filename - check for a trailing # '/' and treat it accordingly. source_file = xsglob[0] - if dest_path[-1] == '/' or os.path.split(dest_path)[-1] in ('.', '..'): + if dest_path and (dest_path[-1] == '/' or os.path.split(dest_path)[-1] in ('.', '..')): self.to_inject[source_file] = os.path.normpath( os.path.join( '.',