Skip to content

Commit

Permalink
Auto allow shell for profiles with env override
Browse files Browse the repository at this point in the history
  • Loading branch information
jreichman committed Aug 24, 2023
1 parent 7f2fddd commit e001984
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dfbar/dfbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ def main():
logger.log_warning('ignore missing does not apply with a profile name.')
ignore_missing = False

# Shell parsing is automatically allowed for profiles, unless disabled by environment var
env_shell = os.environ.get('DFBAR_ALLOW_PROFILE_SHELL')
if env_shell is not None and env_shell.lower() not in ['1', 'true']:
allow_shell = False
else:
allow_shell = True

# dockerfile should be empty and we have an array of a single directory/spec, representing the
# profile to run
spec_list = [ os.path.join(os.path.expanduser('~'), '.dfbar', args.spec) ]
Expand Down

0 comments on commit e001984

Please sign in to comment.