fix: delete management/ncp.ps1 - it shadowed the ncp.cmd PATH shim
PowerShell resolves ExternalScript (.ps1) ahead of Application (.cmd), and both lived in the directory the installer puts on PATH -- so in PowerShell `ncp` ran the .ps1 and was execution-policy-bound again, the exact thing the .cmd exists to avoid. Its other justification (giving ncp to pwsh on Linux) stopped being true once /usr/local/bin/ncp existed: pwsh runs a PATH symlink to a shell script as an Application. A test now prevents the file coming back. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -82,20 +82,6 @@ EOF
|
||||
echo "Registered promethean in ~/.bashrc."
|
||||
fi
|
||||
|
||||
# Same ncp inside PowerShell, if pwsh is installed here. bash functions are
|
||||
# invisible to pwsh, so without this `ncp` is "not recognized" there even
|
||||
# though it works in bash. install-windows.ps1 does this on the Windows side;
|
||||
# this profile lives outside the repo, so a restore has to re-add it.
|
||||
if command -v pwsh >/dev/null; then
|
||||
ps_profile="$HOME/.config/powershell/profile.ps1"
|
||||
if ! grep -q "NexusOS ncp" "$ps_profile" 2>/dev/null; then
|
||||
mkdir -p "$(dirname "$ps_profile")"
|
||||
printf '\n# NexusOS ncp\nfunction ncp { & "%s/management/ncp.ps1" @args }\n' \
|
||||
"$NEXUS_ROOT" >> "$ps_profile"
|
||||
echo "Registered ncp in $ps_profile."
|
||||
fi
|
||||
fi
|
||||
|
||||
# The AMD box runs CPU-only (Vega 20, 4GB VRAM thrashes). An NVIDIA box should not.
|
||||
if command -v nvidia-smi >/dev/null && command -v sqlite3 >/dev/null && \
|
||||
[ "$(sqlite3 "$NEXUS_ROOT/synapse/memory/memory.db" \
|
||||
|
||||
Reference in New Issue
Block a user