mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 20:09:39 -08:00
parent
d9e642a132
commit
adb49d1cd0
|
@ -113,8 +113,21 @@ function Sync-PoshArtifacts {
|
|||
Sync-PoshThemes -Version $Version
|
||||
}
|
||||
|
||||
$moduleVersion = Split-Path -Leaf $MyInvocation.MyCommand.ScriptBlock.Module.ModuleBase
|
||||
Sync-PoshArtifacts -Version $moduleVersion
|
||||
try {
|
||||
$moduleVersion = Split-Path -Leaf $MyInvocation.MyCommand.ScriptBlock.Module.ModuleBase
|
||||
Sync-PoshArtifacts -Version $moduleVersion
|
||||
}
|
||||
catch {
|
||||
$message = @'
|
||||
Oh My Posh is unable to download and store the latest version.
|
||||
In case you installed using AllUsers and are a non-admin user,
|
||||
please run the following command as an administrator:
|
||||
|
||||
Import-Module oh-my-posh
|
||||
'@
|
||||
Write-Error $message
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Legacy functions
|
||||
|
||||
|
|
Loading…
Reference in a new issue