File tree Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change 71
71
script (if (= :uninitialized script)
72
72
(reset! *open-url-script* (open-url-script-val ))
73
73
script)]
74
- (or (when script (sh/launch script (str url)) true )
74
+ (or (when script (sh/sh script (str url)) true )
75
75
(open-url-in-browser url)
76
76
(open-url-in-swing url))))
Original file line number Diff line number Diff line change @@ -127,21 +127,6 @@ collecting its stdout"}
127
127
exit-code (.waitFor proc)]
128
128
{:exit exit-code :out @out :err @err}))))
129
129
130
- (defn launch
131
- " Same as sh except the I/O channels of the sub-process are ignored.
132
-
133
- Use when you want the sub-process to take an action, but do not want to wait
134
- for the I/O channels to close. Example: Launching a browser with xdg-open.
135
- "
136
- {:added " 1.11" }
137
- [& args]
138
- (let [[cmd opts] (parse-args args)
139
- proc (.exec (Runtime/getRuntime )
140
- ^" [Ljava.lang.String;" (into-array cmd)
141
- (as-env-strings (:env opts))
142
- (as-file (:dir opts)))]
143
- {:exit (.waitFor proc)}))
144
-
145
130
(comment
146
131
147
132
(println (sh " ls" " -l" ))
@@ -154,9 +139,4 @@ collecting its stdout"}
154
139
(println (sh " cat" " myimage.png" :out-enc :bytes )) ; reads binary file into bytes[]
155
140
(println (sh " cmd" " /c dir 1>&2" ))
156
141
157
- (println (launch " touch" " my-test-file" ))
158
- (println (sh " ls" " -l" " my-test-file" ))
159
- (println (launch " rm" " my-test-file" ))
160
- (println (sh " ls" " -l" " my-test-file" ))
161
-
162
142
)
You can’t perform that action at this time.
0 commit comments