mirror of
				https://github.com/ScoopInstaller/Main.git
				synced 2025-11-03 23:31:20 +00:00 
			
		
		
		
	* Added purge uninstall for fnm * Must use Remove-Item, so using Test-Path too * Updated fnm to 1.37.2 * Updated fnm * Remove $schema * Add suggestions by Lutra-Fs * Added note about persistence * Set FNM_HOME in process scope in post_install * Removed workaround that was not needed
		
			
				
	
	
		
			60 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
{
 | 
						|
    "version": "1.38.1",
 | 
						|
    "description": "Cross-platform Node.js version switcher",
 | 
						|
    "homepage": "https://github.com/Schniz/fnm",
 | 
						|
    "license": "GPL-3.0-only",
 | 
						|
    "notes": [
 | 
						|
        "Don't forget to add \"fnm env --use-on-cd | Out-String | Invoke-Expression\" to your powershell profile.",
 | 
						|
        "The FNM_DIR environment variable has been set and the data persisted by Scoop since v1.38.1.",
 | 
						|
        "* Before: $env:APPDATA\\fnm",
 | 
						|
        "* After: $persist_dir\\fnm"
 | 
						|
    ],
 | 
						|
    "architecture": {
 | 
						|
        "64bit": {
 | 
						|
            "url": "https://github.com/Schniz/fnm/releases/download/v1.38.1/fnm-windows.zip",
 | 
						|
            "hash": "377796e8f2f51eb8b5de8983974caa8922b83c167197b68b33962775703ad4a0"
 | 
						|
        }
 | 
						|
    },
 | 
						|
    "env_set": {
 | 
						|
        "FNM_DIR": "$dir"
 | 
						|
    },
 | 
						|
    "bin": "fnm.exe",
 | 
						|
    "persist": [
 | 
						|
        "aliases",
 | 
						|
        "node-versions"
 | 
						|
    ],
 | 
						|
    "post_uninstall": [
 | 
						|
        "if ($purge) {",
 | 
						|
        "    # Directories",
 | 
						|
        "    $Directories = [string[]](",
 | 
						|
        "        ('{0}\\fnm_multishells' -f $env:LOCALAPPDATA),",
 | 
						|
        "        ('{0}\\fnm' -f $env:APPDATA)",
 | 
						|
        "    )",
 | 
						|
        "    $Directories.ForEach{",
 | 
						|
        "        if (Test-Path -Path $_ -PathType 'Container') {",
 | 
						|
        "            $null = Remove-Item -Path $_ -Recurse -Force",
 | 
						|
        "        }",
 | 
						|
        "    }",
 | 
						|
        "    # Environment variables",
 | 
						|
        "    $EnvScope = [string]$(if($global){'Machine'}else{'User'})",
 | 
						|
        "    [System.Environment]::GetEnvironmentVariables($EnvScope).GetEnumerator().Where{",
 | 
						|
        "        $_.'Name' -like 'FNM_*'",
 | 
						|
        "    }.ForEach{",
 | 
						|
        "        [System.Environment]::SetEnvironmentVariable(",
 | 
						|
        "            $_.'Name',",
 | 
						|
        "            $null,",
 | 
						|
        "            $EnvScope",
 | 
						|
        "        )",
 | 
						|
        "    }",
 | 
						|
        "}"
 | 
						|
    ],
 | 
						|
    "checkver": "github",
 | 
						|
    "autoupdate": {
 | 
						|
        "architecture": {
 | 
						|
            "64bit": {
 | 
						|
                "url": "https://github.com/Schniz/fnm/releases/download/v$version/fnm-windows.zip"
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |