Skip to content

Commit 4583162

Browse files
author
José Valim
committed
Improve docs for mix run
1 parent b20fea7 commit 4583162

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/mix/lib/mix/tasks/run.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ defmodule Mix.Tasks.Run do
99
Before running the code, it invokes the prepare task
1010
which defaults to compile and load your project.
1111
12+
## Command line options
13+
14+
* `--require`, `-r` - Requires a file before running the command
15+
* `--parallel-require`, `-pr` - Requires a file in parallel
16+
* `--no-halt` - Does not halt the system after running the command
17+
1218
## Examples
1319
1420
mix run Hello.world
@@ -32,6 +38,8 @@ defmodule Mix.Tasks.Run do
3238

3339
Mix.Task.run Mix.project[:prepare_task], args
3440
Code.eval Enum.join(head, " ")
41+
42+
if opts[:no_halt], do: :timer.sleep(:infinity)
3543
end
3644

3745
defp filter_patterns(pattern) do

0 commit comments

Comments
 (0)