File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -1007,7 +1007,18 @@ void Dispose_Windows(void);
1007
1007
1008
1008
if (call == NULL ) {
1009
1009
/* command in argv */
1010
- goto cleanup ; /* NOT IMPLEMENTED*/
1010
+ // count the length of the full command line...
1011
+ size_t len = 1 ; // termination byte
1012
+ for (int n = 0 ; n < argc ; n ++ ) {
1013
+ len += wcslen (argv [n ]) + 1 ;
1014
+ }
1015
+ cmd = cast (wchar_t * , malloc (len * sizeof (wchar_t )));
1016
+ cmd [0 ] = L'\0' ;
1017
+ // construct the command line
1018
+ for (int n = 0 ; n < argc ; n ++ ) {
1019
+ wcscat (cmd , argv [n ]);
1020
+ wcscat (cmd , L" " );
1021
+ }
1011
1022
} else {
1012
1023
if (flag_shell ) {
1013
1024
// command to cmd.exe needs to be surrounded by quotes to preserve the inner quotes
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ rebol-cmd: func[cmd][
18
18
call/shell/wait/output/error cmd out-buffer err-buffer
19
19
]
20
20
21
- ===start-group=== "Command-Line Interface"
21
+ ===start-group=== "Command-Line Interface (/shell) "
22
22
;@@ https://github.com/Oldes/Rebol-issues/issues/2228
23
23
--test-- "--do"
24
24
;@@ https://github.com/Oldes/Rebol-issues/issues/2467
@@ -75,6 +75,19 @@ rebol-cmd: func[cmd][
75
75
===end-group===
76
76
77
77
78
+ ===start-group=== "Command-Line Interface"
79
+ --test-- "Block input"
80
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/2582
81
+ --assert all [
82
+ file? try [write %issue-2582.r3 {Rebol [] print now} ]
83
+ tmp: clear ""
84
+ 0 = call/wait/output reduce [system/options/boot %issue-2582.r3 ] tmp
85
+ date? transcode/one tmp
86
+ ]
87
+ delete %issue-2582.r3
88
+ ===end-group===
89
+
90
+
78
91
===start-group=== "Error pipe"
79
92
--test-- "User controlled error output"
80
93
;@@ https://github.com/Oldes/Rebol-issues/issues/2468
You can’t perform that action at this time.
0 commit comments