Given an argument list beginning with a `*.py` file, return one with that uses sys.executable as arg[0].
(args)
| 201 | |
| 202 | |
| 203 | def FixPythonExecutable(args): |
| 204 | """Given an argument list beginning with a `*.py` file, return one with that |
| 205 | uses sys.executable as arg[0]. |
| 206 | """ |
| 207 | exe, rest = args[0], args[1:] |
| 208 | if os.path.splitext(exe)[1] == '.py': |
| 209 | return [sys.executable, os.path.join(REPO_ROOT_DIR, exe)] + rest |
| 210 | return args |
| 211 | |
| 212 | |
| 213 | class CommandTemplate(object): |