#!/usr/bin/env -S pwsh -NoLogo -NoProfile -NonInteractive

# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest

$admin = "${PSScriptRoot}"
$source = "${admin}/../"

Set-Location $source

& "${admin}/dotnet_wrapper.sh" tool install `
    --add-source "${source}/.cache/nupkg" `
    --global `
    --verbosity diagnostic `
    $args

if ($LASTEXITCODE -ne 0) {
    throw "dotnet_wrapper.sh failed"
}
