From a618137bc2736d88eed97387efcabb960cb6caf1 Mon Sep 17 00:00:00 2001 From: Stéphane Cerveau Date: Wed, 10 Apr 2019 12:23:09 +0000 Subject: keep the original PS1 info from host env Closes #138 --- cerbero/utils/shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cerbero/utils/shell.py b/cerbero/utils/shell.py index 06a39a42..2b76704b 100644 --- a/cerbero/utils/shell.py +++ b/cerbero/utils/shell.py @@ -548,7 +548,7 @@ if [ -e ~/.bashrc ]; then source ~/.bashrc fi %s -PS1='\[\033[01;32m\][cerbero-%s-%s]\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +PS1='\[\033[01;32m\][cerbero-%s-%s]\[\033[00m\]%s' ''' MSYSBAT = ''' start bash.exe --rcfile %s @@ -570,10 +570,10 @@ start bash.exe --rcfile %s # We should remove the temporary directory # but there is a race with the bash process else: + ps1 = os.environ.get('PS1', '') bashrc = tempfile.NamedTemporaryFile() - bashrc.write((BASHRC % (sourcedirsh, platform, arch)).encode()) + bashrc.write((BASHRC % (sourcedirsh, platform, arch, ps1)).encode()) bashrc.flush() - shell = os.environ.get('SHELL', '/bin/bash') if os.system("%s --rcfile %s -c echo 'test' > /dev/null 2>&1" % (shell, bashrc.name)) == 0: os.execlp(shell, shell, '--rcfile', bashrc.name) -- cgit v1.2.3