#!/bin/bash

# Our policy is that the .envrc is entirely optional, and a user
# without direnv should not really have a worse dev experience in any way.

# 'make' is in charge of creating and managing virtualenvs, and things like
# pytest can still be directly invoked using .venv/bin/pytest

if ! source .venv/bin/activate; then
    echo "!!! you have no virtualenv, run 'make setup' to fix that."
    # XXX: ideally, direnv is able to export PS1 as modified by sourcing venvs
    #      but we'd have to patch direnv, and ".venv" isn't descriptive anyways
    unset PS1
fi
