Skip to content
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

Fix download agent search relying on throwing of Sys.which() #28157

Closed
wants to merge 1 commit into from

Conversation

staticfloat
Copy link
Sponsor Member

When this code was transferred over, it relied on Sys.which() throwing, which was changed in the Sys.which() PR, but this code snippet never got updated.

staticfloat referenced this pull request Jul 18, 2018
This fixes issues on systems that don't have `which` available
try
downloadcmd = basename(something(Sys.which.(download_agents)...))
catch
error("no download agent available; install curl, wget, or fetch")
end
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Would be better (and not longer) to write this as a loop, rather than obscuring all errors with this message

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

What else can throw here except something(nothing)?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I agree it would be nicer to do without try/catch entirely, since that's now possible here.

@KristofferC KristofferC mentioned this pull request Aug 20, 2018
KristofferC pushed a commit that referenced this pull request Sep 4, 2018
…#28157 (#28682)

* Fix download agent search relying on throwing of Sys.which()
KristofferC pushed a commit that referenced this pull request Sep 4, 2018
…#28157 (#28682)

* Fix download agent search relying on throwing of Sys.which()

(cherry picked from commit 14fb104)
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
…#28157 (#28682)

* Fix download agent search relying on throwing of Sys.which()

(cherry picked from commit 14fb104)
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
…#28157 (#28682)

* Fix download agent search relying on throwing of Sys.which()

(cherry picked from commit 14fb104)
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
…#28157 (#28682)

* Fix download agent search relying on throwing of Sys.which()

(cherry picked from commit 14fb104)
@staticfloat staticfloat deleted the sf/which_doesnt_throw branch April 16, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants