File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,20 @@ function declare_old_executable_product(product_name)
22 path_name = Symbol (string (product_name, " _path" ))
33 return quote
44 # This is the old-style `withenv()`-based function
5+ """
6+ $($ product_name) (f::Function; adjust_PATH::Bool=true, adjust_LIBPATH::Bool=true)
7+
8+ An `ExecutableProduct` wrapper that supports the execution of $($ product_name) .
9+
10+ # Example
11+ ```julia
12+ $($ product_name) () do exe
13+ run(`\$ exe \$ arguments`)
14+ end
15+ ```
16+
17+ !!! compat "Julia 1.3"
18+ """
519 function $ (product_name)(f:: Function ; adjust_PATH:: Bool = true , adjust_LIBPATH:: Bool = true )
620 # We sub off to a shared function to avoid compiling the same thing over and over again
721 return Base. invokelatest (
@@ -30,6 +44,19 @@ function declare_new_executable_product(product_name)
3044 path_name = Symbol (string (product_name, " _path" ))
3145 return quote
3246 # This is the new-style `addenv()`-based function
47+ @doc """
48+ $($ product_name) (; adjust_PATH::Bool=true, adjust_LIBPATH::Bool=true) -> Cmd
49+
50+ An `ExecutableProduct` wrapper that supports the execution of $($ product_name) .
51+ This wrapper is thread-safe and should be preferred on Julia 1.6+.
52+
53+ # Example
54+ ```julia
55+ run(`\$ ($($ product_name) ()) \$ arguments`)
56+ ```
57+
58+ !!! compat "Julia 1.6"
59+ """
3360 function $ (product_name)(; adjust_PATH:: Bool = true , adjust_LIBPATH:: Bool = true )
3461 env = Base. invokelatest (
3562 JLLWrappers. adjust_ENV!,
You can’t perform that action at this time.
0 commit comments