You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2019/07/17 21:32:00 UTC

[mesos] 01/03: Windows: Fixed confusing name for command executors.

This is an automated email from the ASF dual-hosted git repository.

josephwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit e1c0cc3041d92661d50e2ad7515f952df23665c8
Author: Joseph Wu <jo...@apache.org>
AuthorDate: Mon Jul 15 11:57:05 2019 -0700

    Windows: Fixed confusing name for command executors.
    
    This tweaks the generated name for command executors, specifically
    for shell commands.  The generated name would output `sh -c`, even
    on Windows where the shell is `cmd /c`.
    
    Review: https://reviews.apache.org/r/71075
---
 src/slave/slave.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 2477975..0e7e4d4 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -6481,7 +6481,11 @@ ExecutorInfo Slave::getExecutorInfo(
     if (!task.command().has_value()) {
       name += "(Command: NO COMMAND)";
     } else {
+#ifdef __WINDOWS__
+      name += "(Command: cmd /c '";
+#else
       name += "(Command: sh -c '";
+#endif // __WINDOWS__
       if (task.command().value().length() > 15) {
         name += task.command().value().substr(0, 12) + "...')";
       } else {