Skip to content

Commit

Permalink
Redirect venv warnings from stderr to debug output
Browse files Browse the repository at this point in the history
The message was disturbing during regular use on NixOS
because the file system layout doesn't conform with FHS
and sys.base_prefix != sys.prefix.
  • Loading branch information
dmach committed Jun 28, 2024
1 parent 7366227 commit 473f6fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def load_command(self, cls, module_prefix):

def load_commands(self):
if IN_VENV:
output.print_msg("Running in virtual environment, skipping loading plugins installed outside the virtual environment.", print_to="stderr")
output.print_msg("Running in virtual environment, skipping loading plugins installed outside the virtual environment.", print_to="debug")

for module_prefix, module_path in self.MODULES:
module_path = os.path.expanduser(module_path)
Expand Down Expand Up @@ -10231,7 +10231,7 @@ def do_comment(self, subcmd, opts, *args):

def _load_plugins(self):
if IN_VENV:
output.print_msg("Running in virtual environment, skipping loading legacy plugins.", print_to="stderr")
output.print_msg("Running in virtual environment, skipping loading legacy plugins.", print_to="debug")
return

plugin_dirs = [
Expand Down

0 comments on commit 473f6fd

Please sign in to comment.