Permalink
Browse files

Merge pull request #179 from stchris/patch-1

If PYTHONDONTWRITEBYTECODE is set, issue a useful error message and die. Thanks Christian Stefanescu.
  • Loading branch information...
2 parents 9cdd3d7 + a1b8632 commit cc6fc4d1605e276ce89250f22c12b70fa2e480b2 @carljm carljm committed Oct 28, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 virtualenv.py
View
@@ -783,7 +783,10 @@ def main():
file = file[:-1]
popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
raise SystemExit(popen.wait())
-
+
+ if os.environ.get('PYTHONDONTWRITEBYTECODE'):
+ print('You must unset the $PYTHONDONTWRITEBYTECODE environment variable before running virtualenv.')
+ sys.exit(2)
if not args:
print('You must provide a DEST_DIR')
parser.print_help()

0 comments on commit cc6fc4d

Please sign in to comment.