d
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Bootstrap Installation Troubleshooting Guide
|
# Bootstrap Installation Troubleshooting Guide
|
||||||
|
|
||||||
## Problem on "Other Computer"
|
## Problem on "Other Computer"
|
||||||
|
|
||||||
|
|||||||
@@ -1001,17 +1001,18 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
|
|||||||
f'set "REPO={repo_bat_str}"\n'
|
f'set "REPO={repo_bat_str}"\n'
|
||||||
"set \"VENV=!REPO!\\.venv\"\n"
|
"set \"VENV=!REPO!\\.venv\"\n"
|
||||||
"set \"PY=!VENV!\\Scripts\\python.exe\"\n"
|
"set \"PY=!VENV!\\Scripts\\python.exe\"\n"
|
||||||
|
"set \"ENTRY=!REPO!\\scripts\\cli_entry.py\"\n"
|
||||||
"if exist \"!PY!\" (\n"
|
"if exist \"!PY!\" (\n"
|
||||||
" if defined MM_DEBUG (\n"
|
" if defined MM_DEBUG (\n"
|
||||||
" echo MM_DEBUG: using venv python at !PY!\n"
|
" echo MM_DEBUG: using venv python at !PY!\n"
|
||||||
" \"!PY!\" -c \"import sys; print('sys.executable:', sys.executable); print('sys.path:', sys.path[:5])\"\n"
|
" \"!PY!\" -c \"import sys; print('sys.executable:', sys.executable); print('sys.path:', sys.path[:5])\"\n"
|
||||||
" )\n"
|
" )\n"
|
||||||
" \"!PY!\" -m scripts.cli_entry %*\n"
|
" \"!PY!\" \"!ENTRY!\" %*\n"
|
||||||
" exit /b !ERRORLEVEL!\n"
|
" exit /b !ERRORLEVEL!\n"
|
||||||
")\n"
|
")\n"
|
||||||
"echo MM: venv python not found at !PY!\n"
|
"echo MM: venv python not found at !PY!\n"
|
||||||
"if defined MM_DEBUG echo MM_DEBUG: venv python not found, trying system python\n"
|
"if defined MM_DEBUG echo MM_DEBUG: venv python not found, trying system python\n"
|
||||||
"python -m scripts.cli_entry %*\n"
|
"python \"!ENTRY!\" %*\n"
|
||||||
"exit /b !ERRORLEVEL!\n"
|
"exit /b !ERRORLEVEL!\n"
|
||||||
)
|
)
|
||||||
if mm_bat.exists():
|
if mm_bat.exists():
|
||||||
@@ -1044,7 +1045,8 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
|
|||||||
"$bin = '{bin}';"
|
"$bin = '{bin}';"
|
||||||
"$cur = [Environment]::GetEnvironmentVariable('PATH','User');"
|
"$cur = [Environment]::GetEnvironmentVariable('PATH','User');"
|
||||||
"if ($cur -notlike \"*$bin*\") {{"
|
"if ($cur -notlike \"*$bin*\") {{"
|
||||||
"[Environment]::SetEnvironmentVariable('PATH', ($bin + ';' + ($cur -ne $null ? $cur : '')), 'User');"
|
" $val = if ($cur) {{ $bin + ';' + $cur }} else {{ $bin }};"
|
||||||
|
" [Environment]::SetEnvironmentVariable('PATH', $val, 'User');"
|
||||||
"}}"
|
"}}"
|
||||||
).format(bin=str_bin.replace("\\", "\\\\"))
|
).format(bin=str_bin.replace("\\", "\\\\"))
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user