asdf-vm on Windows
Windows 11 seems to be shaping up to be a nicer experience than macOS, but I find myself really missing the convenience of asdf when I'm using it. Let's try porting it.
Thoughts
- MSYS2 seems like a great base for this.
- For now let's rely on it being externally installed and its
bash
being first onPATH
. - Later we might ship an installer bundling MSYS2 and the configuration we need.
- We want our files to live in
$USERPROFILE
, so we need to set$HOME
to it. Edit/etc/nsswitch.conf
and ensuredb_home
haswindows
before other values.
- For now let's rely on it being externally installed and its
- We'll need to mess around with
$PATH
a bit.- Windows includes tools like
FIND
which are incongruent with the Unix tools plugins expect. - Can we safely bump
C:\Windows\system32
after MSYS2 onPATH
in our wrapper?
- Windows includes tools like
- I'm conflating PowerShell with Windows for the time being, we can figure out other platforms later.
Progress
- PowerShell wrapper
- Command Prompt wrapper
- Generate
*.cmd
shims- Also need to strip
.exe
file extension from shell shims - Update the obsolete shim removal code to leave valid
*.cmd
shims alone
- Also need to strip
- Get some plugins working:
-
nodejs
- Depends on Python
- Will need to get node-build working first
- To use custom build, set
ASDF_NODEJS_NODEBUILD
- To use custom build, set
- Get binary installations working
- Generate shims in
bin
forcorepack
,node
,npm
, andnpx
- Get source installations working
-
task
- Handle binary files having file extensions
- Extract zip files
- Use
PROCESSOR_ARCHITECTURE
if available so we can run ARM64 builds?
-
Diffs
Backlinks