File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ def _convert_stdstreams_to_files(
207207 else :
208208 workflowobj ["stdin" ] = (
209209 "$(inputs.%s.path)"
210- % cast (str , inp ["id" ]).rpartition ("#" )[2 ]
210+ % cast (str , inp ["id" ]).rpartition ("#" )[2 ]. split ( "/" )[ - 1 ]
211211 )
212212 inp ["type" ] = "File"
213213 else :
Original file line number Diff line number Diff line change @@ -1303,6 +1303,18 @@ def test_bad_stdout_expr_error() -> None:
13031303 )
13041304
13051305
1306+ def test_stdin_with_id_preset () -> None :
1307+ """Confirm that a type: stdin with a preset id does not give an error."""
1308+ error_code , _ , stderr = get_main_output (
1309+ [
1310+ get_data ("tests/wf/1590.cwl" ),
1311+ "--file1" ,
1312+ get_data ("tests/wf/whale.txt" ),
1313+ ]
1314+ )
1315+ assert error_code == 0
1316+
1317+
13061318@needs_docker
13071319@pytest .mark .parametrize ("factor" , test_factors )
13081320def test_no_compute_chcksum (tmp_path : Path , factor : str ) -> None :
Original file line number Diff line number Diff line change 1+ {
2+ "baseCommand" : [
3+ "cat"
4+ ],
5+ "class" : "CommandLineTool" ,
6+ "cwlVersion" : "v1. 2" ,
7+ "id" : "cat-tool-shortcut. cwl" ,
8+ "inputs" : [
9+ {
10+ "id" : "file1" ,
11+ "type" : "stdin"
12+ }
13+ ],
14+ "outputs" : [
15+ {
16+ "id" : "output" ,
17+ "outputBinding" : {
18+ "glob" : "output"
19+ },
20+ "type" : "File"
21+ }
22+ ],
23+ "requirements" : [
24+ {
25+ "class" : "DockerRequirement" ,
26+ "dockerPull" : "debian:stretch-slim"
27+ }
28+ ],
29+ "stdout" : "output"
30+ }
You can’t perform that action at this time.
0 commit comments