Skip to content

Temporary venv is not automatically removed #27

@Gregor1337

Description

@Gregor1337

Hi,
first of all, thanks a lot for creating this neat module.

I am trying to get the mktmpenv command to work, however, I think that the venv hook does not call the generated postdeactivate.ps1 script.

Asides, I changed the postdeactivate-script to

if (Test-Path -Path `"$dest_dir\README.tmpenv`") {
    Write-Host `"Removing temporary environment $uuid`"
    # Change the location else MS Windows will refuse to remove the directory
    Set-Location `"$WORKON_HOME`" 
    Remove-VirtualEnv `"$uuid`"
}

s.t. it correctly removes the tmp env when executed manually in a shell. Yet, the script is not executed when running deactivate within the tmp env.

Maybe you can say where you found documentation or source for the use of postdeactivate scripts with venv?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions