Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: go/bootstrap.py

Issue 2121653002: Fix prompt exporting escaped characters, opt into PS1 mod. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix pylint error. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/README.md ('k') | go/env.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/bootstrap.py
diff --git a/go/bootstrap.py b/go/bootstrap.py
index 196f3dbd44cb981beb4996e1435a14f92ba425bf..790dab4c5258611c020adceb48c1c6e33eeaab5a 100755
--- a/go/bootstrap.py
+++ b/go/bootstrap.py
@@ -394,11 +394,13 @@ def get_go_environ(
env.pop('APPENGINE_DEV_APPSERVER', None)
# Add a tag to the prompt
- prompt = env.get('PS1')
- if prompt:
- prompttag = env.get('INFRA_PROMPT_TAG', '[cr go] ')
- if prompttag not in prompt:
- env['PS1'] = prompttag + prompt
+ infra_prompt_tag = env.get('INFRA_PROMPT_TAG')
+ if infra_prompt_tag is None:
+ infra_prompt_tag = '[cr go] '
+ if infra_prompt_tag:
+ prompt = env.get('PS1')
+ if prompt and infra_prompt_tag not in prompt:
+ env['PS1'] = infra_prompt_tag + prompt
return env
« no previous file with comments | « go/README.md ('k') | go/env.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698