Skip to content

Commit

Permalink
fix(package): corrects exec command parsing (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabpain authored May 30, 2024
1 parent 959d2b4 commit 1f0a271
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions riocli/package/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,18 @@ def _map_executable(self, exec):
if 'livenessProbe' in exec:
exec_object.livenessProbe = exec.livenessProbe

if exec.get('runAsBash'):
if 'command' in exec:
exec_object.cmd = ['/bin/bash', '-c', exec.command]
else:
# TODO verify this is right for secret?
if 'command' in exec:
exec_object.cmd = [exec.command]
if 'command' in exec:
c = []

if exec.get('runAsBash'):
c = ['/bin/bash', '-c']

if isinstance(exec.command, list):
c.extend(exec.command)
else:
c.append(exec.command)

exec_object.cmd = c

if exec.type == 'docker':
exec_object.docker = exec.docker.image
Expand Down

0 comments on commit 1f0a271

Please sign in to comment.