Repository: mesos
Updated Branches:
  refs/heads/master dedf29566 -> d4bfd8b1f


Windows: Fixed path to `curl`.

On Windows, `curl.exe` must be executed rather then `curl`.

Review: https://reviews.apache.org/r/65508/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ae5a6966
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ae5a6966
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ae5a6966

Branch: refs/heads/master
Commit: ae5a6966ac07aa57c8c6c57f96935e1cd26c4aac
Parents: dedf295
Author: Jeff Coffler <j...@taltos.com>
Authored: Thu Feb 8 15:18:29 2018 -0800
Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Committed: Thu Feb 8 15:30:43 2018 -0800

----------------------------------------------------------------------
 src/uri/fetchers/curl.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ae5a6966/src/uri/fetchers/curl.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/curl.cpp b/src/uri/fetchers/curl.cpp
index f34daf2..e18573d 100644
--- a/src/uri/fetchers/curl.cpp
+++ b/src/uri/fetchers/curl.cpp
@@ -96,10 +96,16 @@ Future<Nothing> CurlFetcherPlugin::fetch(
   }
 
   // TODO(jieyu): Allow user to specify the name of the output file.
-  const string output = path::join(directory, Path(uri.path()).basename());
+  const string output =
+    path::join(directory, Path(path::from_uri(uri.path())).basename());
+#ifndef __WINDOWS__
+  const string curl = "curl";
+#else
+  const string curl = "curl.exe";
+#endif // __WINDOWS__
 
   const vector<string> argv = {
-    "curl",
+    curl,
     "-s",                 // Don't show progress meter or error messages.
     "-S",                 // Makes curl show an error message if it fails.
     "-L",                 // Follow HTTP 3xx redirects.
@@ -109,7 +115,7 @@ Future<Nothing> CurlFetcherPlugin::fetch(
   };
 
   Try<Subprocess> s = subprocess(
-      "curl",
+      curl,
       argv,
       Subprocess::PATH(os::DEV_NULL),
       Subprocess::PIPE(),

Reply via email to