diff options
author | Justin Schneck <jschneck@mac.com> | 2016-09-15 08:27:14 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2016-09-15 14:27:14 +0200 |
commit | 76b355a9d90989987174a87957622ecc372add00 (patch) | |
tree | 1e8c01fd12e16b3286eeb5c47526d1058a4f5992 | |
parent | e6971f966c486d212aec06e28a9ce6cce30a71ea (diff) | |
download | elixir-76b355a9d90989987174a87957622ecc372add00.tar.gz |
change mix cmd to use --app instead of --only (#5220)
-rw-r--r-- | lib/mix/lib/mix/tasks/cmd.ex | 6 | ||||
-rw-r--r-- | lib/mix/test/mix/tasks/cmd_test.exs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/mix/lib/mix/tasks/cmd.ex b/lib/mix/lib/mix/tasks/cmd.ex index 875efa8d1..7e755188e 100644 --- a/lib/mix/lib/mix/tasks/cmd.ex +++ b/lib/mix/lib/mix/tasks/cmd.ex @@ -13,9 +13,9 @@ defmodule Mix.Tasks.Cmd do mix cmd echo pwd You can limit which apps the cmd runs in by passing the app names - before the cmd using --only: + before the cmd using --app: - mix cmd --only app1 --only app2 echo pwd + mix cmd --app app1 --app app2 echo pwd Aborts when a command exits with a non-zero status. """ @@ -33,7 +33,7 @@ defmodule Mix.Tasks.Cmd do defp parse_apps(args, apps) do case args do - ["--only", app | tail] -> + ["--app", app | tail] -> parse_apps(tail, [String.to_atom(app) | apps]) args -> {args, apps} end diff --git a/lib/mix/test/mix/tasks/cmd_test.exs b/lib/mix/test/mix/tasks/cmd_test.exs index 35fd9327f..14a116a2e 100644 --- a/lib/mix/test/mix/tasks/cmd_test.exs +++ b/lib/mix/test/mix/tasks/cmd_test.exs @@ -19,7 +19,7 @@ defmodule Mix.Tasks.CmdTest do test "only run the cmd for specified apps" do in_fixture "umbrella_dep/deps/umbrella", fn -> Mix.Project.in_project(:umbrella, ".", fn _ -> - Mix.Task.run "cmd", ["--only", "bar", "echo", "hello"] + Mix.Task.run "cmd", ["--app", "bar", "echo", "hello"] nl = os_newline() assert_received {:mix_shell, :info, ["==> bar"]} assert_received {:mix_shell, :run, ["hello" <> ^nl]} |