Ports the ncp PATH work from upstream. Registering ncp as a shell-profile function failed three ways on Windows: the default Restricted execution policy blocks the profile itself, profiles don't exist outside PowerShell (cmd, Win+R, Task Scheduler), and the self-elevating installer writes the admin's profile. Windows now ships management/ncp.cmd and the installer appends management\ to the Machine PATH via [Environment]::SetEnvironmentVariable -- never setx, which truncates PATH at 1024 chars. A .cmd is exempt from the execution policy. Linux symlinks /usr/local/bin/ncp -> management/nexus-cli.sh, falling back to the old .bashrc function when sudo is unavailable. Also renames requirements-wsl.txt to requirements-windows.txt and purges stale WSL references, including vite.config.js's dev-server comment and controlpanel.py's "Check WSLg." error string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
847 B
Batchfile
17 lines
847 B
Batchfile
@echo off
|
|
REM ncp - PATH entry point on Windows. A .cmd, not a .ps1, on purpose: PowerShell's
|
|
REM execution policy governs .ps1 only, so this keeps working under the default
|
|
REM Restricted policy and from cmd, Win+R, Task Scheduler and .lnk targets - none
|
|
REM of which load a PowerShell profile. install-windows.ps1 puts this directory on
|
|
REM the machine PATH. ncp.ps1 stays for pwsh-on-Linux, where there is no PATH shim.
|
|
REM
|
|
REM ASCII only, same rule as the .ps1 files - a test in tests/test_smoke.py enforces it.
|
|
setlocal
|
|
set "ROOT=%~dp0.."
|
|
REM System Python fallback so backup/restore work before the venv exists; those
|
|
REM delegate to the stdlib-only bin/sync.py. Mirrors the same fallback in ncp.ps1.
|
|
set "PY=%ROOT%\Promethean\Scripts\python.exe"
|
|
if not exist "%PY%" set "PY=python"
|
|
"%PY%" "%ROOT%\management\ncp.py" %*
|
|
exit /b %ERRORLEVEL%
|