bootstrap: auto-enable editable install for dev checkouts (git repo) with no prompt
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
@@ -153,9 +153,9 @@ if (-not $NoInstall) {
|
|||||||
try { $gitOut = & git -C $repoRoot rev-parse --is-inside-work-tree 2>$null; if ($gitOut -eq 'true') { $isGit = $true } } catch {}
|
try { $gitOut = & git -C $repoRoot rev-parse --is-inside-work-tree 2>$null; if ($gitOut -eq 'true') { $isGit = $true } } catch {}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
if ($isGit -and -not $Quiet) {
|
if ($isGit) {
|
||||||
$ans = Read-Host "It looks like this is a development checkout (git repo). Install project in editable mode for development? (Y/n)"
|
$Editable = $true
|
||||||
if ($ans -eq '' -or $ans -eq 'y' -or $ans -eq 'Y') { $Editable = $true; Write-Log "Selected editable install for development." "INFO" }
|
Write-Log "Detected development checkout; installing in editable mode for development." "INFO"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,16 +258,11 @@ if [[ ! -x "$VENV_PY" ]]; then
|
|||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$NOINSTALL" != "true" ]]; then # If not explicitly requested, suggest editable install for development checkouts
|
if [[ "$NOINSTALL" != "true" ]]; then # If not explicitly requested, auto-select editable install for development checkouts (no prompt)
|
||||||
if [[ "$EDITABLE" != "true" ]]; then
|
if [[ "$EDITABLE" != "true" ]]; then
|
||||||
if [[ -d "$REPO/.git" ]] || git -C "$REPO" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
if [[ -d "$REPO/.git" ]] || git -C "$REPO" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
if [[ "$QUIET" != "true" && -t 0 ]]; then
|
EDITABLE=true
|
||||||
read -p "It looks like this is a development checkout (git repo). Install project in editable mode for development? (Y/n) " devans
|
echo "Detected development checkout; performing editable install for development"
|
||||||
if [[ -z "$devans" || "$devans" == "y" || "$devans" == "Y" ]]; then
|
|
||||||
EDITABLE=true
|
|
||||||
echo "Selected: editable install for development"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Upgrading pip, setuptools, wheel..."
|
echo "Upgrading pip, setuptools, wheel..."
|
||||||
|
|||||||
Reference in New Issue
Block a user