From f287dfd4ca17488128b3730675080954fd49bb38 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Tue, 23 Apr 2019 11:06:13 +0800 Subject: [PATCH] fix for windows --- staticcheck/common/awtk_files.py | 12 +++++++++--- staticcheck/common/awtk_files.pyc | Bin 3305 -> 3548 bytes 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/staticcheck/common/awtk_files.py b/staticcheck/common/awtk_files.py index 3ed19618e..682bfeed6 100644 --- a/staticcheck/common/awtk_files.py +++ b/staticcheck/common/awtk_files.py @@ -55,9 +55,15 @@ def toExe(name): else: return name +def writeArgs(filename, str): + fd = os.open(filename, os.O_RDWR | os.O_CREAT | os.O_TRUNC) + os.write(fd, str) + os.close(fd) + def run(cmd, flags, files): - cmd_args=cmd + ' ' + flags + ' ' + getIncludes() + ' ' + ' '.join(files) + cmd_args = flags + ' ' + getIncludes() + ' ' + ' '.join(files) + cmd_args = cmd_args.replace('\\', '\\\\'); + writeArgs("args.txt", cmd_args); print(cmd_args) - #os.system(cmd_args); - subprocess.call(cmd_args, shell=True); + os.system(cmd + ' @args.txt'); diff --git a/staticcheck/common/awtk_files.pyc b/staticcheck/common/awtk_files.pyc index d9580c541e1d394090cee3780cc182fb6b60e3ec..26f46cb05795ec48226c68624b5480f6d7d18029 100644 GIT binary patch delta 1009 zcmb7Cy>HV{5WlnIq={N+kr1K*iV9WTr2|_#KwAe{rN#W6STVP$^Z4 z%EpEzRv3|(P$w4t5(ZXgW)OF73u22c-|s%(`R@1pkSr7 zpX)v2!gY8J@Z>gx2)p);?2Ykh)tRmjy_^5GQItWj1!&ZsV~_m2qx6?)}Xc zN$F0zwGA2zi>~;ET;75uiqA4X=VlT8AAqPG2bvyDiw56e5 zO%ABa9rDj^rqA^{J6eVXyoIwEoYN%Qk=#=TUjJ=%aojZ^^jg?HU$4*t82f_IV~O)ubf_F?*=QMLX6B7_7$ delta 763 zcmca3{Zdkz`79IX^cyKTm&i2J=5g3iMCz zXDy;cyB1q6CE5?LQR4Z@2iQa>uVn9{#04=N>I%%j;0MJG2!o=c*bPY3FfgPrGKkjz z@#G_%O7ZRe8{a#<#jpAJBYBt9)OC$(6wpt1zy zqN36~E0CRRK!Sl$i;g>B@{DeiC-Qm% E068q+sQ>@~