1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-07-03 06:00:14 +02:00

Updated install-edit.ps1

This commit is contained in:
Markus Fleschutz
2025-06-25 16:27:53 +02:00
parent 5ea38da16e
commit 74ff3721ea

@ -14,12 +14,17 @@
#> #>
try { try {
"⏳ Installing Microsoft Edit from Microsoft Store..."
$stopWatch = [system.diagnostics.stopwatch]::startNew() $stopWatch = [system.diagnostics.stopwatch]::startNew()
& winget install --id Microsoft.Edit --accept-package-agreements --accept-source-agreements if ($IsLinux) {
if ($lastExitCode -ne 0) { throw "Can't install Microsoft Edit, is it already installed?" } "⏳ Installing Microsoft Edit from Snap Store..."
& sudo snap install msedit
if ($lastExitCode -ne 0) { throw "Can't install Microsoft Edit, is it already installed?" }
} else {
"⏳ Installing Microsoft Edit from Microsoft Store..."
& winget install --id Microsoft.Edit --accept-package-agreements --accept-source-agreements
if ($lastExitCode -ne 0) { throw "Can't install Microsoft Edit, is it already installed?" }
}
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds [int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✅ Microsoft Edit installed successfully in $($elapsed)s." "✅ Microsoft Edit installed successfully in $($elapsed)s."
exit 0 # success exit 0 # success