diff options
| author | ruki <[email protected]> | 2020-03-05 00:44:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-04 22:28:35 +0800 |
| commit | 2b76f2067865b587f71af7327ebacb2ce96acb6e (patch) | |
| tree | 37e6e9eec9ecb394a0278aaa8dd4f7daf325d89b | |
| parent | b9563696ad039ce9fc8da06d3c875b5696dad975 (diff) | |
fix filter/shell
| -rw-r--r-- | xmake/core/base/filter.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/filter.lua b/xmake/core/base/filter.lua index 5d59a4eca..bcb61a323 100644 --- a/xmake/core/base/filter.lua +++ b/xmake/core/base/filter.lua @@ -27,6 +27,7 @@ local winos = require("base/winos") local table = require("base/table") local utils = require("base/utils") local string = require("base/string") +local scheduler = require("base/scheduler") -- globals local escape_table1 = {["$"] = "\001", ["("] = "\002", [")"] = "\003", ["%"] = "\004"} @@ -60,7 +61,9 @@ function filter.shell(cmd) end -- run shell + scheduler:enable(false) -- disable coroutine scheduler to fix `attempt to yield across C-call boundary` when call gsub -> yield local ok, outdata, errdata = os.iorun(cmd) + scheduler:enable(true) if not ok then os.raise("run $(shell %s) failed, errors: %s", cmd, errdata or "") end |
