From d9749c81897ace66bbce2d428cca7118c0f53cd0 Mon Sep 17 00:00:00 2001 From: Dominik Gabi Date: Fri, 16 Sep 2016 15:00:43 -0700 Subject: [PATCH] escape `{` in cmd for deprecated `Substring(std::string...)` Summary: Since `shellify` interprets the command as a format string we need to escape `{` and `}`. Reviewed By: ldemailly, simpkins Differential Revision: D3874605 fbshipit-source-id: f47db387c3a44a3ba1c0c1d4726b7212fcb5ef3e --- folly/Subprocess.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/Subprocess.cpp b/folly/Subprocess.cpp index 912b54f2..93e3f577 100644 --- a/folly/Subprocess.cpp +++ b/folly/Subprocess.cpp @@ -184,7 +184,7 @@ Subprocess::Subprocess( throw std::invalid_argument("usePath() not allowed when running in shell"); } - auto argv = shellify(cmd); + std::vector argv = {"/bin/sh", "-c", cmd}; spawn(cloneStrings(argv), argv[0].c_str(), options, env); } -- 2.34.1