Skip to content

Refine Start-PythonOnboarding.ps1: add -PrepareOnly and safer custom launch - #641

Merged
yourlastnamesoundslikeatypeofpasta merged 1 commit into
mainfrom
codex/refine-powershell-onboarding-script
Feb 16, 2026
Merged

Refine Start-PythonOnboarding.ps1: add -PrepareOnly and safer custom launch#641
yourlastnamesoundslikeatypeofpasta merged 1 commit into
mainfrom
codex/refine-powershell-onboarding-script

Conversation

@yourlastnamesoundslikeatypeofpasta

Copy link
Copy Markdown
Owner

Motivation

  • Provide a way to prepare a Python project environment (venv + requirements) without automatically starting the server so users can opt out of immediate launch.
  • Make custom launch mode safer by avoiding Invoke-Expression and running the intended executable directly with argument passing.
  • Clarify the intended PowerShell/Python boundary where PowerShell orchestrates UX and lifecycle steps while Python is invoked only for Python-specific tasks.

Description

  • Added a -PrepareOnly switch to scripts/Start-PythonOnboarding.ps1 that stops after creating the venv and installing requirements and prints an activation hint.
  • Reworked custom launch mode to map python|python3|py to the venv interpreter and execute commands using the call operator (&) with @ServerArguments instead of Invoke-Expression.
  • Preserved existing script (& $venvPython $ServerTarget) and module (& $venvPython -m $ServerTarget) launch behaviors.
  • Updated scripts/README.md to add an entry for Start-PythonOnboarding.ps1.

Testing

  • Performed static inspection and line-by-line review of the modified Start-PythonOnboarding.ps1 file which passed review.
  • Verified repository operations with git commit and git show --stat --oneline which succeeded.
  • Attempted to run pwsh -NoLogo -NoProfile -Command '$PSVersionTable.PSVersion' but the runtime is not available in this environment, so no end-to-end execution or Pester tests were run.

Codex Task

@yourlastnamesoundslikeatypeofpasta
yourlastnamesoundslikeatypeofpasta merged commit 3622816 into main Feb 16, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant