Skip to content

Commit

Permalink
Prevents shell expansion in API (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbteves authored Nov 8, 2019
1 parent 633f6ba commit 6635e2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tedana/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ def test_integration_five_echo(skip_integration):
# download data and run the test
download_test_data('https://osf.io/9c42e/download',
os.path.dirname(out_dir))
prepend = '/tmp/data/five-echo/p06.SBJ01_S09_Task11_e'
suffix = '.sm.nii.gz'
datalist = [prepend + str(i+1) + suffix for i in range(5)]
tedana_workflow(
data='/tmp/data/five-echo/p06.SBJ01_S09_Task11_e[1,2,3,4,5].sm.nii.gz',
data=datalist,
tes=[15.4, 29.7, 44.0, 58.3, 72.6],
out_dir=out_dir,
debug=True, verbose=True)
Expand Down
2 changes: 2 additions & 0 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ def tedana_workflow(data, tes, mask=None, mixm=None, ctab=None, manacc=None,

# coerce data to samples x echos x time array
if isinstance(data, str):
if not op.exists(data):
raise ValueError('Zcat file {} does not exist'.format(data))
data = [data]

LGR.info('Loading input data: {}'.format([f for f in data]))
Expand Down

0 comments on commit 6635e2a

Please sign in to comment.