diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb933cfa0..d0499fbd55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - **config:** Allow Scoop to check if apps versioned as 'nightly' are outdated ([#5166](https://github.com/ScoopInstaller/Scoop/issues/5166)) +- **checkup:** Add Windows Developer Mode check ([#5233](https://github.com/ScoopInstaller/Scoop/issues/5233)) ### Bug Fixes diff --git a/lib/diagnostic.ps1 b/lib/diagnostic.ps1 index 5caf8e7c7e..e4cc97e6a2 100644 --- a/lib/diagnostic.ps1 +++ b/lib/diagnostic.ps1 @@ -53,3 +53,17 @@ function check_long_paths { return $true } + +function Get-WindowsDeveloperModeStatus { + $DevModRegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" + if (!(Test-Path -Path $DevModRegistryPath) -or (Get-ItemProperty -Path ` + $DevModRegistryPath -Name AllowDevelopmentWithoutDevLicense -ErrorAction ` + SilentlyContinue).AllowDevelopmentWithoutDevLicense -ne 1) { + warn "Windows Developer Mode is not enabled. Operations relevant to symlinks may fail without proper rights." + Write-Host " You may read more about the symlinks support here:" + Write-Host " https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/" + return $false + } + + return $true +} diff --git a/libexec/scoop-checkup.ps1 b/libexec/scoop-checkup.ps1 index 3c6c5f4f50..a775ec3964 100644 --- a/libexec/scoop-checkup.ps1 +++ b/libexec/scoop-checkup.ps1 @@ -17,6 +17,7 @@ if ($adminPrivileges) { $issues += !(check_main_bucket) $issues += !(check_long_paths) +$issues += !(Get-WindowsDeveloperModeStatus) if (!(Test-HelperInstalled -Helper 7zip)) { error "'7-Zip' is not installed! It's required for unpacking most programs. Please Run 'scoop install 7zip' or 'scoop install 7zip-zstd'."