Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve docs for mix run

  • Loading branch information...
commit 4583162eda811a53edbed001039ea685569dae77 1 parent b20fea7
@josevalim josevalim authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/mix/lib/mix/tasks/run.ex
View
8 lib/mix/lib/mix/tasks/run.ex
@@ -9,6 +9,12 @@ defmodule Mix.Tasks.Run do
Before running the code, it invokes the prepare task
which defaults to compile and load your project.
+ ## Command line options
+
+ * `--require`, `-r` - Requires a file before running the command
+ * `--parallel-require`, `-pr` - Requires a file in parallel
+ * `--no-halt` - Does not halt the system after running the command
+
## Examples
mix run Hello.world
@@ -32,6 +38,8 @@ defmodule Mix.Tasks.Run do
Mix.Task.run Mix.project[:prepare_task], args
Code.eval Enum.join(head, " ")
+
+ if opts[:no_halt], do: :timer.sleep(:infinity)
end
defp filter_patterns(pattern) do
Please sign in to comment.
Something went wrong with that request. Please try again.