Tighten comments and docstrings added by the image-generation fixes

This commit is contained in:
Daniel Han 2026-07-13 05:29:09 +00:00
commit e0ef488f47
25 changed files with 140 additions and 252 deletions

View file

@ -364,11 +364,8 @@ function Uninstall-UnslothStudio {
_StopByPortFile -PortFile (Join-Path $r "share\studio.port") -KnownRoots $knownRoots
}
_StopStudioProcesses -KnownRoots $knownRoots
# The default sd.cpp dir is only killed+deleted when it carries our owner marker (the deletion
# below is marker-gated). Passing it to the locking-process stop UNCONDITIONALLY would terminate
# a user's own sd-server running from an unowned checkout at this default path -- a process we
# then decide to keep the directory for. Gate the kill on the same predicate so stop and delete
# agree: include it only when marked owned (and present).
# Only stop the default sd.cpp dir when it carries our owner marker, so stop matches the
# marker-gated delete and a user's own sd-server at this default path is left running.
$defaultSdCppToStop = $null
if ($defaultSdCpp -and (Test-Path -LiteralPath $defaultSdCpp) -and (Test-Path -LiteralPath (Join-Path $defaultSdCpp ".unsloth-studio-owned") -PathType Leaf)) {
$defaultSdCppToStop = $defaultSdCpp