Skip to content

Commit

Permalink
fix of hint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed May 19, 2024
1 parent cfff5c8 commit d0d0975
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .esh/commands/link.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
$PROFILE_DIR = Split-Path -Path $PROFILE -Parent
$ModulesDir = "$PROFILE_DIR\Modules"
New-Item $ModulesDir -ItemType Directory -Force -ErrorAction Ignore | Out-Null
try {
Remove-Item "$ModulesDir\ps12exe" -Recurse -Force -Confirm
}
catch {}
Remove-Item "$ModulesDir\ps12exe" -Recurse -Force -Confirm -ErrorAction Ignore
cmd /c mklink /j "$ModulesDir\ps12exe" "$PSScriptRoot\..\.."
4 changes: 2 additions & 2 deletions src/LocaleLoader.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[string]$Localize
)
$file = "$LocalizeDir\$Localize.ps1"
if (Test-Path $file) { $Script:LocalizeData = try { &$file } catch {} }
if (Test-Path $file) { $Script:LocalizeData = try { &$file } catch { $null } }
},
[string]$Localize
)
Expand All @@ -26,7 +26,7 @@ if (!$Localize) {
if (!$Localize -and (Get-Command locale -ErrorAction Ignore)) {
$Localize = try {
&locale -uU
} catch {}
} catch { $null }
}
if ($Localize) {
$Localize = $Localize.Split('.')[0].Replace('_', '-')
Expand Down
2 changes: 1 addition & 1 deletion src/programFrames/default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ public class ConsoleColorProxy {
private readonly PSRunnerUI _ui;

public ConsoleColorProxy(PSRunnerUI ui) {
if (ui == null) throw new ArgumentNullException("ui");
ArgumentNullException.ThrowIfNull(ui);
_ui = ui;
}

Expand Down

0 comments on commit d0d0975

Please sign in to comment.