#Windows allergic to Zig

1 messages · Page 1 of 1 (latest)

fluid wolf
#

So
I downloaded the tarball
Unzipped it
Put somewhere nice and safe
Then I went into the Edit Path Variables dialogue and made a new one with the path to zig.exe(also tried with the directory it’s in)
Restart PC
Didn’t work?????

#

This stuff was so annoying I left windows for 4 years

#

Literally quit my coding hobby until I learned about Linux VMs

hardy hill
#

make sure you added the folder and not the file path

fluid wolf
#

I did

#

It don’t be working

late mantle
#

you usually don't need to restart to pick up PATH changes on windows

confirm your user path has C:\Path\To\ZigFolder

look in taskmgr for any cmd.exe or cmd.com or WindowsTerminal or powershell.exe or similar processes and kill them

start up a new powershell window and run Get-Command zig

if you've set up your path correctly, it will print something like this:


CommandType     Name   Version    Source
-----------     ----   -------    ------
Application     zig.exe 0.0.0.0    C:\Path\To\ZigFolder\zig.exe
fluid wolf
late mantle
#

run powershell, not command prompt

next halo
#

No existing terminals/consoles can see changes to the environment (including PATH).

fluid wolf
#
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-Command zig
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (zig:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
#

yeah thats why i keep restarting

#

to no avail

late mantle
#

run $env:PATH.Contains("zig")

next halo
#

shows result of dumping your environment (or PATH).

late mantle
#

putting 10 bucks on it being a typo 😉

fluid wolf
#

ok so it returns false

#

but i can see

#

in the Path dialouge

#

its there

#

this one

next halo
#

Like we said, you have to close that dialog, save changes, and restart your dev console.

fluid wolf
#

Which I have done

next halo
#

We can help you more if you show your actual PATH. (start a normal command proimpt (not Powershell) and type set PATH and show us what you get

late mantle
#

($env:PATH to print the path in powershell)

fluid wolf
next halo
#

There you go. On windows you can winget zig, rather than try to deal with tarballs.

fluid wolf
#

oh

#

that

#

would have been nice to know

#

😭

next halo
#

But since you have it (assuming you got the Windows tarball downloaded and unpacked), you just need to edit your path correctly.

fluid wolf
#

yeah im doing it the easy way

next halo
#

not sure which way that would be for you 😉

fluid wolf
#

neither

#

yay its working