Remove sh -euc from output
This commit is contained in:
parent
5a38535cdb
commit
217777f60e
@ -52,9 +52,6 @@ class Subprocess:
|
||||
write=None,
|
||||
flush=None,
|
||||
):
|
||||
if len(args) == 1 and ' ' in args[0]:
|
||||
args = ['sh', '-euc', args[0]]
|
||||
|
||||
self.args = args
|
||||
self.quiet = quiet if quiet is not None else False
|
||||
self.prefix = prefix
|
||||
@ -79,7 +76,7 @@ class Subprocess:
|
||||
self.output(
|
||||
self.colors.bgray.encode()
|
||||
+ b'+ '
|
||||
+ shlex.join([
|
||||
+ ' '.join([
|
||||
arg.replace('\n', '\\n')
|
||||
for arg in self.args
|
||||
]).encode()
|
||||
@ -93,13 +90,19 @@ class Subprocess:
|
||||
|
||||
self.exit_future = asyncio.Future(loop=loop)
|
||||
|
||||
if len(self.args) == 1 and ' ' in self.args[0]:
|
||||
args = ['sh', '-euc', self.args[0]]
|
||||
else:
|
||||
args = self.args
|
||||
|
||||
# Create the subprocess controlled by DateProtocol;
|
||||
# redirect the standard output into a pipe.
|
||||
self.transport, self.protocol = await loop.subprocess_exec(
|
||||
lambda: SubprocessProtocol(self),
|
||||
*self.args,
|
||||
*args,
|
||||
stdin=None,
|
||||
)
|
||||
|
||||
self.started = True
|
||||
|
||||
async def wait(self, *args, **kwargs):
|
||||
|
||||
@ -74,7 +74,7 @@ async def test_prefix():
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'| '
|
||||
+ Proc.colors.bgray.encode()
|
||||
+ b'+ sh -euc \'echo hi\''
|
||||
+ b'+ echo hi'
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'\n'
|
||||
),
|
||||
@ -92,7 +92,7 @@ async def test_prefix():
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'| '
|
||||
+ Proc.colors.bgray.encode()
|
||||
+ b'+ sh -euc \'echo hi\''
|
||||
+ b'+ echo hi'
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'\n'
|
||||
),
|
||||
@ -112,7 +112,7 @@ async def test_prefix():
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'| '
|
||||
+ Proc.colors.bgray.encode()
|
||||
+ b'+ sh -euc \'echo hi\''
|
||||
+ b'+ echo hi'
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'\n'
|
||||
),
|
||||
@ -143,7 +143,7 @@ async def test_prefix_multiline():
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'| '
|
||||
+ Proc.colors.bgray.encode()
|
||||
+ b'+ sh -euc \'echo -e "a\\nb"\''
|
||||
+ b'+ echo -e "a\\nb"'
|
||||
+ Proc.colors.reset.encode()
|
||||
+ b'\n'
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user