Skip to content

Report correct location if local.hex failed #2787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 27, 2014
Merged

Conversation

ericmj
Copy link
Member

@ericmj ericmj commented Sep 23, 2014

Fixes #2765.

@@ -366,25 +366,34 @@ defmodule Mix.Utils do

* `:shell` - Forces the use of `wget` or `curl` to fetch the file if the
given path is a URL.

* `:file` - Writes the output to a file specified by given path instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are changing the return value, I agree with you, this is better as a new function. :S

@ericmj
Copy link
Member Author

ericmj commented Sep 24, 2014

Pushed with discussed changes.

if opts[:force] || overwriting?(target) do
cond do
url?(source) && opts[:shell] ->
read_shell(source, file: target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pass the target directly instead of making it an option?

josevalim added a commit that referenced this pull request Sep 27, 2014
Report correct location if local.hex failed
@josevalim josevalim merged commit 4130ca3 into master Sep 27, 2014
@josevalim josevalim deleted the emj-hex-file-error branch September 27, 2014 09:14
josevalim added a commit that referenced this pull request Sep 27, 2014
Report correct location if local.hex failed

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

mix local.hex is reporting the wrong location in case --shell fails
2 participants