Skip to content

Commit

Permalink
Revert "Don't clobber sys.path[0]. #715"
Browse files Browse the repository at this point in the history
This reverts commit e82d24d.
  • Loading branch information
nedbat committed Oct 22, 2018
1 parent bf86427 commit 77029e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@ Unreleased
- Coverage will create directories as needed for the data file if they don't
exist, closing `issue 721`_.

- Coverage commands no longer clobber the first entry in sys.path, fixing
`issue 715`_.

- Improvements to context support:

- The "no such table: meta" error is fixed.: `issue 716`_.

- Combining data files now goes much faster.

.. _issue 695: https://github.com/nedbat/coveragepy/issues/695
.. _issue 715: https://github.com/nedbat/coveragepy/issues/715
.. _issue 716: https://github.com/nedbat/coveragepy/issues/716
.. _issue 721: https://github.com/nedbat/coveragepy/issues/721

Expand Down
4 changes: 4 additions & 0 deletions coverage/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ def command_line(self, argv):
if self.do_help(options, args, parser):
return OK

# We need to be able to import from the current directory, because
# plugins may try to, for example, to read Django settings.
sys.path[0] = ''

# Listify the list options.
source = unshell_list(options.source)
omit = unshell_list(options.omit)
Expand Down

0 comments on commit 77029e9

Please sign in to comment.