Skip to content

Commit

Permalink
Merge pull request spotify#224 from lamby/disallow-nested-build
Browse files Browse the repository at this point in the history
Disallow building the dh-virtualenv whilst within a virtualenv?
  • Loading branch information
nailor authored Apr 13, 2018
2 parents b7101f6 + 116029a commit 3db71ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/dh_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def main():
dh = DebHelper(packages=options.package or None)
else:
dh = DebHelper(options)
if hasattr(sys, 'real_prefix'):
log.error('Already in a virtualenv. This is likely to generate an '
'invalid package (run "deactivate" first?)')
return 1
for package, details in dh.packages.items():
def _info(msg):
log.info('{0}: {1}'.format(package, msg))
Expand Down

0 comments on commit 3db71ee

Please sign in to comment.