##// END OF EJS Templates
jobctrl: use shell if the command line has shell control chars (|><), so that "bzr log | less" etc. work
Ville M. Vainio -
Show More
@@ -189,7 +189,7 b' def magic_kill(self,line):'
189 189 magic_tasks(self,line)
190 190
191 191 if sys.platform == 'win32':
192 shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir time type ver vol'.split()
192 shell_internal_commands = 'break chcp cls copy ctty date del erase dir md mkdir path prompt rd rmdir time type ver vol'.split()
193 193 else:
194 194 # todo linux commands
195 195 shell_internal_commands = []
@@ -199,7 +199,7 b' def jobctrl_shellcmd(ip,cmd):'
199 199 """ os.system replacement that stores process info to db['tasks/t1234'] """
200 200 cmd = cmd.strip()
201 201 cmdname = cmd.split(None,1)[0]
202 if cmdname in shell_internal_commands:
202 if cmdname in shell_internal_commands or '|' in cmd or '>' in cmd or '<' in cmd:
203 203 use_shell = True
204 204 else:
205 205 use_shell = False
General Comments 0
You need to be logged in to leave comments. Login now