Skip to content

Commit

Permalink
🚜 Removes prompt for project creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Sep 16, 2024
1 parent 5cced21 commit fdc5792
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
33 changes: 17 additions & 16 deletions home/.virtualenvs/postactivate
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ if ! [ -e "${VIRTUAL_ENV_ENVRC}" ]; then
touch .envrc

# Let's set some default ENV values
# echo "export COMPOSE_DOCKER_CLI_BUILD=1" >> .envrc
# echo "export DOCKER_BUILDKIT=1" >> .envrc
# echo "export DOCKER_CONTEXT=desktop-linux" >> .envrc
echo "export DOCKER_CONTEXT=orbstack" >> .envrc
echo "export PIP_DISABLE_PIP_VERSION_CHECK=1" >> .envrc
echo "export PYTHONDONTWRITEBYTECODE=1" >> .envrc
echo "export PYTHONUNBUFFERED=1" >> .envrc
echo "export UV_PROJECT_ENVIRONMENT=\$VIRTUAL_ENV" >> .envrc
#echo "export UV_PROJECT_ENVIRONMENT=\$VIRTUAL_ENV" >> .envrc

# Run direnv to allow list our new ENV values
if ! [ -e direnv ]; then
Expand Down Expand Up @@ -89,23 +86,27 @@ fi
# ------------------------------------------------------------

PROJECT_FILE="${SUBLIME_TEXT_PROJECT_PATH}/${VIRTUAL_ENV_NAME}.sublime-project"
CONTINUE=false
# CONTINUE=false

if ! [ -e "${PROJECT_FILE}" ]; then
echo "Would you like to create a new SublimeText project for this virtualenv?"
CONFIRM=$(gum choose "yes" "no" --selected="yes")
# echo "Would you like to create a new SublimeText project for this virtualenv?"
# CONFIRM=$(gum choose "yes" "no" --selected="yes")

echo
# echo

if [[ $CONFIRM =~ "yes" ]]; then
CONTINUE=true
fi
# if [[ $CONFIRM =~ "yes" ]]; then
# CONTINUE=true
# fi

if $CONTINUE; then
if ! [ -e jq ]; then
echo "Creating ${PROJECT_FILE}"
echo "{\"folders\": [{\"path\": \"${VIRTUAL_ENV_SRC}\"}]}" | jq > "${PROJECT_FILE}"
fi
# if $CONTINUE; then
# if ! [ -e jq ]; then
# echo "Creating ${PROJECT_FILE}"
# echo "{\"folders\": [{\"path\": \"${VIRTUAL_ENV_SRC}\"}]}" | jq > "${PROJECT_FILE}"
# fi
# fi
if ! [ -e jq ]; then
echo "Creating ${PROJECT_FILE}"
echo "{\"folders\": [{\"path\": \"${VIRTUAL_ENV_SRC}\"}]}" | jq > "${PROJECT_FILE}"
fi
fi

Expand Down
3 changes: 0 additions & 3 deletions home/.virtualenvs/postmkvirtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
# This hook is run after a new virtualenv is activated.

just --justfile=${HOME}/justfile virtualenvwrapper::postmkvirtualenv

# python -m pip install --upgrade pip
# python -m pip install --upgrade pip-tools

0 comments on commit fdc5792

Please sign in to comment.