diff --git a/MacOS/Components/Diagnostics/simple_report.sh b/MacOS/Components/Diagnostics/simple_report.sh index cf136f73..861eb7a3 100755 --- a/MacOS/Components/Diagnostics/simple_report.sh +++ b/MacOS/Components/Diagnostics/simple_report.sh @@ -139,19 +139,22 @@ run_first_year_test() { # Test 5: VS Code Extensions echo "Testing VS Code Extensions..." - if code --list-extensions 2>/dev/null | grep -q "ms-python.python"; then - echo "PASS: Python extension installed" - if code --list-extensions 2>/dev/null | grep -q "ms-toolsai.jupyter"; then - echo "PASS: Jupyter extension installed" + if [ "$vscode_failed" = false ]; then + if code --list-extensions 2>/dev/null | grep -q "ms-python.python"; then + echo "PASS: Python extension installed" + if code --list-extensions 2>/dev/null | grep -q "ms-toolsai.jupyter"; then + echo "PASS: Jupyter extension installed" + else + echo "FAIL: Jupyter extension missing" + extensions_failed=true + fi else - echo "FAIL: Jupyter extension missing" + echo "FAIL: Python extension missing" extensions_failed=true fi else - echo "FAIL: Python extension missing" - extensions_failed=true + echo "SKIP: VS Code not available for extension testing" fi - echo "" # Test 6: Conda Base Environment Activation @@ -726,4 +729,4 @@ main() { # Also run if executed via bash -c (when BASH_SOURCE[0] is bash) if [[ "${BASH_SOURCE[0]}" == "${0}" ]] || [[ "${BASH_SOURCE[0]}" == "bash" ]] || [[ -z "${BASH_SOURCE[0]}" ]]; then main -fi \ No newline at end of file +fi diff --git a/Windows/Components/Diagnostics/generate_report.ps1 b/Windows/Components/Diagnostics/generate_report.ps1 index 6bb56dcf..d84825e0 100644 --- a/Windows/Components/Diagnostics/generate_report.ps1 +++ b/Windows/Components/Diagnostics/generate_report.ps1 @@ -178,6 +178,7 @@ function Test-FirstYearSetup { Write-Output "" $failCount = 0 + $vsCodeWorks = false # Test 1: Miniforge Installation Write-Output "Testing Miniforge Installation..." @@ -251,6 +252,7 @@ function Test-FirstYearSetup { $codeTest = & $SystemInfo.VSCodePath --version 2>$null if ($LASTEXITCODE -eq 0) { Write-Output "PASS: VS Code $($codeTest | Select-Object -First 1)" + $vsCodeWorks = true } else { Write-Output "FAIL: VS Code not available" $failCount++ @@ -263,7 +265,7 @@ function Test-FirstYearSetup { # Test 5: VS Code Extensions Write-Output "Testing VS Code Extensions..." - if ($SystemInfo.VSCodePath) { + if ($SystemInfo.VSCodePath -and $vsCodeWorks) { $pythonExtension = & $SystemInfo.VSCodePath --list-extensions 2>$null | Where-Object { $_ -eq "ms-python.python" } if ($pythonExtension) { Write-Output "PASS: Python extension installed" @@ -279,8 +281,7 @@ function Test-FirstYearSetup { $failCount++ } } else { - Write-Output "FAIL: VS Code not available for extension testing" - $failCount++ + Write-Output "SKIP: VS Code not available for extension testing" } Write-Output ""