From cfa37ea79f294309dc2be657198bf18a5cca1c16 Mon Sep 17 00:00:00 2001 From: zhangzheng28 Date: Sat, 13 Jun 2015 12:14:23 +0800 Subject: [PATCH 1/2] [ string1 = string2 ] is good compatibility, Such as ubuntu:dash do not support [ string1 == string2 ] Former-commit-id: 02edbc2e739589e0e63b7e2ee072f5c30726be2c --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6d8cb772d82..170d8da1406 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ DEV_ROCKS=busted luacov luacov-coveralls luacheck .PHONY: install dev clean start seed drop lint test coverage test-all install: - @if [ `uname` == "Darwin" ]; then \ + @if [ `uname` = "Darwin" ]; then \ luarocks make kong-*.rockspec; \ else \ luarocks make kong-*.rockspec \ From 30b9366d536c04b91f1cda52eadfdb14d31572d9 Mon Sep 17 00:00:00 2001 From: zhangzheng28 Date: Sat, 13 Jun 2015 17:03:18 +0800 Subject: [PATCH 2/2] LC_ALL = C is to remove all localized Settings, let command can be executed correctly. Former-commit-id: 5fdc3c7ab71ba189b692ef41440edeb9de3dc435 --- spec/unit/tools/io_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/tools/io_spec.lua b/spec/unit/tools/io_spec.lua index f4c83703b91..2e302472bf0 100644 --- a/spec/unit/tools/io_spec.lua +++ b/spec/unit/tools/io_spec.lua @@ -29,7 +29,7 @@ describe("IO", function() assert.are.same(0, code) assert.truthy("Hello", res) - local res, code = IO.os_execute("asdasda \"Hello\"") + local res, code = IO.os_execute("LC_ALL=\"C\";asdasda \"Hello\"") assert.are.same(127, code) assert.are.same("/bin/bash: asdasda: command not found", res) end)