File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -377,10 +377,18 @@ defmodule Mix.Tasks.Test do
377
377
end
378
378
379
379
unless System . get_env ( "MIX_ENV" ) || Mix . env ( ) == :test do
380
- Mix . raise (
381
- "\" mix test\" is running in the \" #{ Mix . env ( ) } \" environment. If you are " <>
382
- "running tests alongside another task, please set MIX_ENV explicitly"
383
- )
380
+ Mix . raise ( """
381
+ "mix test" is running in the \" #{ Mix . env ( ) } \" environment. If you are \
382
+ running tests from within another command, you can either:
383
+
384
+ 1. set MIX_ENV explicitly:
385
+
386
+ MIX_ENV=test mix test.another
387
+
388
+ 2. set the :preferred_cli_env for a command inside "def project" in your mix.exs:
389
+
390
+ preferred_cli_env: ["test.another": :test]
391
+ """ )
384
392
end
385
393
386
394
Mix.Task . run ( "loadpaths" , args )
You can’t perform that action at this time.
0 commit comments