Skip to content

Commit

Permalink
added syntax to have special files in comandline expressions
Browse files Browse the repository at this point in the history
for instance to get a commandline arg like "param=<FileTranfser>", use:
["<join>", "param=", transfer]
  • Loading branch information
denisri committed Oct 2, 2023
1 parent 65bb55c commit c1d2686
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/soma_workflow/client_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def commandline_repl(self, command):
# m = m[:-1]
# WARNING: returns a string, losing
# SpecialPath instances
cmd.append(''.join(m))
cmd.append(''.join([str(x) for x in m]))
else:
cmd.append(m[1])
return cmd
Expand Down
2 changes: 2 additions & 0 deletions python/soma_workflow/engine_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ def generate_command(self, command, mode=None, level=0):
# commandline elements should be strings
item = repr(item)
new_command.append(item)
if len(new_command) != 0 and new_command[0] == '<join>':
new_command = ''.join(new_command[1:])
if isinstance(command, tuple):
new_command = tuple(new_command)
elif isinstance(command, set):
Expand Down

0 comments on commit c1d2686

Please sign in to comment.