Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In PowerShell iex (pdm venv activate) fails #2895

Open
1 task done
yodaldevoid opened this issue May 21, 2024 · 1 comment
Open
1 task done

In PowerShell iex (pdm venv activate) fails #2895

yodaldevoid opened this issue May 21, 2024 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@yodaldevoid
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  1. Install PDM 2.15.3
  2. In PowerShell (any version) clone a project using PDM
git clone https://github.com/pdm-project/pdm.git
cd pdm
  1. Create a venv by using pdm sync
  2. Try to activate that venv using iex (pdm venv activate)

Actual behavior

The path to the activation script is printed and the venv is not activated.

Expected behavior

The venv is activated for the current PowerShell instance.

Environment Information

> pdm info && pdm info --env
PDM version:
  2.15.3
Python Interpreter:
  $PROJECT_DIR\.venv\Scripts\python.exe (3.10)
Project Root:
  $PROJECT_DIR
Local Packages:

{
  "implementation_name": "cpython",
  "implementation_version": "3.10.5",
  "os_name": "nt",
  "platform_machine": "AMD64",
  "platform_release": "10",
  "platform_system": "Windows",
  "platform_version": "10.0.19044",
  "python_full_version": "3.10.5",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "win32"
}

Further Information

Before PDM 2.15.3

> pdm venv activate
. '$PROJECT_DIR\.venv\Scripts\Activate.ps1'

PDM 2.15.3

> pdm venv activate
'$PROJECT_DIR\.venv\Scripts\Activate.ps1'

I believe the missing period before the script path is causing the failure.

@yodaldevoid yodaldevoid added the 🐛 bug Something isn't working label May 21, 2024
@frostming
Copy link
Collaborator

see the context in #2854

you may need to discuss with @Pluttodk on how to solve this cleany and make both happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants