Skip to content

Windows: Respect LongPathsEnabled and avoid root folders? #16

Description

@yutotakano

Hi! Thank you for making the mise-ghcup plugin, it works great on Windows. This is a feature request to improve it a little.

I'm not particularly fond of root-level folders being created by this plugin (at C:\ghc). I understand this was done to work around the 260 character limit for filepaths on Windows.

I think for developers it's quite common to have the registry entry LongPathsEnabled set to 1 to increase the limit to 32k characters (especially since it used to be Node.JS almost required this to be enabled due to deeply nested node_modules folders). I myself have this enabled, and prefer containing tools and dependencies in easily expected places.

PS C:\Users\yuto> Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
LongPathsEnabled : 1
PSPath           : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
PSParentPath     : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
PSChildName      : FileSystem
PSDrive          : HKLM
PSProvider       : Microsoft.PowerShell.Core\Registry
PS C:\Users\yuto>

Would it be possible for the install script to honour the registry entry if it's set to 1, and keep GHC tools together with where other mise tools are, just like with Linux/macOS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions