Skip to content

Commit ede3a43

Browse files
committed
v0.6.24
1 parent 5b4b46c commit ede3a43

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

API.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [`destroy`](#babashka.process/destroy) - Destroys the process and returns the input arg.
88
- [`destroy-tree`](#babashka.process/destroy-tree) - Same as <code>destroy</code> but also destroys all descendants.
99
- [`exec`](#babashka.process/exec) - Replaces the current process image with the process image specified by the given path invoked with the given args.
10+
- [`null-file`](#babashka.process/null-file)
1011
- [`parse-args`](#babashka.process/parse-args) - Parses arguments to <code>process</code> to map with: * <code>:prev</code>: a (previous) process whose input is piped into the current process * <code>:cmd</code>: a vector of command line argument strings * <code>:opts</code>: options map Note that this function bridges the legacy <code>[cmds ?opts]</code> syntax to the newer recommended syntax <code>[?opts & args]</code> and therefore looks unnecessarily complex.
1112
- [`pb`](#babashka.process/pb) - Returns a process builder (as record).
1213
- [`pipeline`](#babashka.process/pipeline) - Returns the processes for one pipe created with -> or creates pipeline from multiple process builders.
@@ -38,7 +39,7 @@ Function.
3839
Convenience macro around [`process`](#babashka.process/process). Takes command as varargs. Options can
3940
be passed via metadata on the form or as a first map arg. Supports
4041
interpolation via `~`
41-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L563-L593">Source</a></sub></p>
42+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L579-L609">Source</a></sub></p>
4243

4344
## <a name="babashka.process/*defaults*">`*defaults*`</a><a name="babashka.process/*defaults*"></a>
4445

@@ -56,7 +57,7 @@ Dynamic var containing overridable default options. Use
5657
```
5758

5859
Returns `true` if the process is still running and false otherwise.
59-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L694-L697">Source</a></sub></p>
60+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L710-L713">Source</a></sub></p>
6061

6162
## <a name="babashka.process/check">`check`</a><a name="babashka.process/check"></a>
6263
``` clojure
@@ -100,7 +101,13 @@ Replaces the current process image with the process image specified
100101
Supported `opts`
101102
- `:arg0`: override first argument (the executable). No-op on Windows.
102103
- `:cmd`, `:env`,`:extra-env`, `:escape`,`:pre-start-fn` : see [`process`](#babashka.process/process).
103-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L618-L656">Source</a></sub></p>
104+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L634-L672">Source</a></sub></p>
105+
106+
## <a name="babashka.process/null-file">`null-file`</a><a name="babashka.process/null-file"></a>
107+
108+
109+
110+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L222-L225">Source</a></sub></p>
104111

105112
## <a name="babashka.process/parse-args">`parse-args`</a><a name="babashka.process/parse-args"></a>
106113
``` clojure
@@ -117,7 +124,7 @@ Parses arguments to [`process`](#babashka.process/process) to map with:
117124
Note that this function bridges the legacy `[cmds ?opts]` syntax to
118125
the newer recommended syntax `[?opts & args]` and therefore looks
119126
unnecessarily complex.
120-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L284-L333">Source</a></sub></p>
127+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L297-L346">Source</a></sub></p>
121128

122129
## <a name="babashka.process/pb">`pb`</a><a name="babashka.process/pb"></a>
123130
``` clojure
@@ -126,7 +133,7 @@ Parses arguments to [`process`](#babashka.process/process) to map with:
126133
```
127134

128135
Returns a process builder (as record).
129-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L335-L342">Source</a></sub></p>
136+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L348-L355">Source</a></sub></p>
130137

131138
## <a name="babashka.process/pipeline">`pipeline`</a><a name="babashka.process/pipeline"></a>
132139
``` clojure
@@ -144,7 +151,7 @@ Returns the processes for one pipe created with -> or creates
144151

145152
Also see [Pipelines](/README.md#pipelines).
146153

147-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L508-L542">Source</a></sub></p>
154+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L524-L558">Source</a></sub></p>
148155

149156
## <a name="babashka.process/process">`process`</a><a name="babashka.process/process"></a>
150157
``` clojure
@@ -186,6 +193,7 @@ Creates a child process. Takes a command (vector of strings or
186193
For writing output to a file, you can set `:out` and `:err` to a `java.io.File` object, or a keyword:
187194
- `:write` + an additional `:out-file`/`:err-file` + file to write to the file.
188195
- `:append` + an additional `:out-file`/`:err-file` + file to append to the file.
196+
To discard `:out` or `:err`, use `:discard`
189197
- `:prev`: output from `:prev` will be piped to the input of this process. Overrides `:in`.
190198
- `:inherit`: if true, sets `:in`, `:out` and `:err` to `:inherit`.
191199
- `:dir`: working directory.
@@ -202,7 +210,7 @@ Creates a child process. Takes a command (vector of strings or
202210
running processes are cleaned up on shutdown. The shutdown hook is
203211
executed as soon as the child process ends.
204212
- `:exit-fn`: a function which is executed upon exit. Receives process map as argument. Only supported in JDK11+.
205-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L438-L491">Source</a></sub></p>
213+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L453-L507">Source</a></sub></p>
206214

207215
## <a name="babashka.process/process*">`process*`</a><a name="babashka.process/process*"></a>
208216
``` clojure
@@ -211,7 +219,7 @@ Creates a child process. Takes a command (vector of strings or
211219
```
212220

213221
Same as with [`process`](#babashka.process/process) but called with parsed arguments (the result from [`parse-args`](#babashka.process/parse-args))
214-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L354-L436">Source</a></sub></p>
222+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L367-L451">Source</a></sub></p>
215223

216224
## <a name="babashka.process/sh">`sh`</a><a name="babashka.process/sh"></a>
217225
``` clojure
@@ -223,7 +231,7 @@ Convenience function similar to `clojure.java.shell/sh` that sets
223231
`:out` and `:err` to `:string` by default and blocks. Similar to
224232
`cjs/sh` it does not check the exit code (this can be done with
225233
[`check`](#babashka.process/check)).
226-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L595-L605">Source</a></sub></p>
234+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L611-L621">Source</a></sub></p>
227235

228236
## <a name="babashka.process/shell">`shell`</a><a name="babashka.process/shell"></a>
229237
``` clojure
@@ -251,7 +259,7 @@ Convenience function around [[`process`](#babashka.process/process)](#babashka.p
251259
- `(shell {:out "/tmp/log.txt"} "git commit -m" "WIP")` ;; `"git commit -m"` is tokenized as `["git" "commit" "-m"]` and `"WIP"` is an additional argument
252260

253261
Also see the [`shell`](#babashka.process/shell) entry in the babashka book [here](https://book.babashka.org/#_shell).
254-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L664-L692">Source</a></sub></p>
262+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L680-L708">Source</a></sub></p>
255263

256264
## <a name="babashka.process/start">`start`</a><a name="babashka.process/start"></a>
257265
``` clojure
@@ -260,7 +268,7 @@ Convenience function around [[`process`](#babashka.process/process)](#babashka.p
260268
```
261269

262270
Takes a process builder, calls start and returns a process (as record).
263-
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L544-L550">Source</a></sub></p>
271+
<p><sub><a href="https://github.com/babashka/process/blob/master/src/babashka/process.cljc#L560-L566">Source</a></sub></p>
264272

265273
## <a name="babashka.process/tokenize">`tokenize`</a><a name="babashka.process/tokenize"></a>
266274
``` clojure

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject babashka/process "0.6.23"
1+
(defproject babashka/process "0.6.24"
22
:description "Clojure library for shelling out / spawning subprocesses"
33
:url "https://github.com/babashka/process"
44
:scm {:name "git"

0 commit comments

Comments
 (0)