File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,29 @@ defmodule Mix.Local do
161
161
contents
162
162
163
163
{ :remote , message } ->
164
- Mix . raise ( """
165
- #{ message }
164
+ Mix . raise (
165
+ """
166
+ #{ message }
166
167
167
- Could not install #{ name } because Mix could not download metadata at #{ path } .
168
- """ )
168
+ Could not install #{ name } because Mix could not download metadata at #{ path } .
169
+ """ <> suggestions ( name )
170
+ )
169
171
end
170
172
end
171
173
174
+ defp suggestions ( "Hex" ) do
175
+ """
176
+
177
+ Alternatively, you can compile and install Hex directly with this command:
178
+
179
+ mix archive.install github hexpm/hex branch latest
180
+ """
181
+ end
182
+
183
+ defp suggestions ( _ ) do
184
+ ""
185
+ end
186
+
172
187
defp parse_csv ( body ) do
173
188
body
174
189
|> :binary . split ( "\n " , [ :global , :trim ] )
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ defmodule Mix.Tasks.Local.Hex do
11
11
12
12
mix local.hex
13
13
14
+ If installing a precompiled Hex does not work, you can compile and install
15
+ Hex directly with this command:
16
+
17
+ mix archive.install github hexpm/hex branch latest
18
+
14
19
## Command line options
15
20
16
21
* `--force` - forces installation without a shell prompt; primarily
You can’t perform that action at this time.
0 commit comments