lightsystemdarkgreen
@ 261119.86
current
{
    "version": "0.117.0",
    "description": "A modern shell written in Rust",
    "homepage": "https://www.nushell.sh",
    "license": "MIT",
    "notes": [
        "Nushell's core plugins ship next to nu.exe but aren't registered, so 'plugin list' is empty by default.",
        "To register them, run the bundled helper in Nushell after installing or updating, then restart your shell:",
        "  nu ($nu.current-exe | path dirname | path join 'register-core-plugins.nu')"
    ],
    "architecture": {
        "64bit": {
            "url": "https://github.com/nushell/nushell/releases/download/0.117.0/nu-0.117.0-x86_64-pc-windows-msvc.zip",
            "hash": "8a135f25d3f22f1542107eb117e94628af35ce65402cbc098bfb26914227d3b2"
        },
        "arm64": {
            "url": "https://github.com/nushell/nushell/releases/download/0.117.0/nu-0.117.0-aarch64-pc-windows-msvc.zip",
            "hash": "68f4188b0ddb883ec17d9265909e18c4cc551bbd6b61c82fa6c5c641afc3198f"
        }
    },
    "post_install": [
        "$core = 'polars', 'formats', 'gstat', 'query', 'inc'",
        "$found = @(Get-ChildItem -LiteralPath $dir -Filter 'nu_plugin_*.exe').Count",
        "$present = @($core | Where-Object { Test-Path -LiteralPath \"$dir\\nu_plugin_$_.exe\" })",
        "$missing = @($core | Where-Object { $_ -notin $present })",
        "if (($found -ne 8) -or $missing) {",
        "    $detail = if ($missing) { \"; missing core: $($missing -join ', ')\" } else { '' }",
        "    Write-Host \"nu: bundled plugin set changed - found $found nu_plugin_*.exe, expected 8$detail. The manifest's core-plugin allowlist may need updating.\" -ForegroundColor Yellow",
        "}",
        "$helper = @(",
        "    '# Register Nushell core plugins, then restart your shell.'",
        "    \"for p in [$($present -join ' ')] {\"",
        "    '    plugin add ($nu.current-exe | path dirname | path join (''nu_plugin_'' + $p + ''.exe''))'",
        "    '}'",
        ")",
        "Set-Content -LiteralPath \"$dir\\register-core-plugins.nu\" -Value $helper -Encoding ascii"
    ],
    "bin": "nu.exe",
    "shortcuts": [
        [
            "nu.exe",
            "Nushell",
            "--execute \"cd ~\""
        ]
    ],
    "post_uninstall": [
        "if ($purge) {",
        "    $Directories = [string[]](",
        "        [System.IO.Path]::Combine($env:APPDATA,'nushell'),",
        "        [System.IO.Path]::Combine($env:LOCALAPPDATA,'nushell')",
        "    )",
        "    $Directories.ForEach{",
        "        if ([System.IO.Directory]::Exists($_)) {",
        "            $null = [System.IO.Directory]::Delete($_,$true)",
        "        }",
        "    }",
        "}"
    ],
    "checkver": {
        "github": "https://github.com/nushell/nushell"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/nushell/nushell/releases/download/$version/nu-$version-x86_64-pc-windows-msvc.zip"
            },
            "arm64": {
                "url": "https://github.com/nushell/nushell/releases/download/$version/nu-$version-aarch64-pc-windows-msvc.zip"
            }
        },
        "hash": {
            "url": "$baseurl/SHA256SUMS"
        }
    }
}