Skip to content

Commit 29e5898

Browse files
authored
feat(checkup): Add Windows Developer Mode check (#5233)
1 parent ea6c738 commit 29e5898

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Features
44

55
- **config:** Allow Scoop to check if apps versioned as 'nightly' are outdated ([#5166](https://github.com/ScoopInstaller/Scoop/issues/5166))
6+
- **checkup:** Add Windows Developer Mode check ([#5233](https://github.com/ScoopInstaller/Scoop/issues/5233))
67

78
### Bug Fixes
89

lib/diagnostic.ps1

+14
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,17 @@ function check_long_paths {
5353

5454
return $true
5555
}
56+
57+
function Get-WindowsDeveloperModeStatus {
58+
$DevModRegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
59+
if (!(Test-Path -Path $DevModRegistryPath) -or (Get-ItemProperty -Path `
60+
$DevModRegistryPath -Name AllowDevelopmentWithoutDevLicense -ErrorAction `
61+
SilentlyContinue).AllowDevelopmentWithoutDevLicense -ne 1) {
62+
warn "Windows Developer Mode is not enabled. Operations relevant to symlinks may fail without proper rights."
63+
Write-Host " You may read more about the symlinks support here:"
64+
Write-Host " https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/"
65+
return $false
66+
}
67+
68+
return $true
69+
}

libexec/scoop-checkup.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if ($adminPrivileges) {
1717

1818
$issues += !(check_main_bucket)
1919
$issues += !(check_long_paths)
20+
$issues += !(Get-WindowsDeveloperModeStatus)
2021

2122
if (!(Test-HelperInstalled -Helper 7zip)) {
2223
error "'7-Zip' is not installed! It's required for unpacking most programs. Please Run 'scoop install 7zip' or 'scoop install 7zip-zstd'."

0 commit comments

Comments
 (0)