r/rust • • May 23 '26
🙋 seeking help & advice my rust code erased my entire path variables and now i need help to recover them
i made a cli monitoring tool called diskwatcher and i made the code to try to put it on the enviorment variables and when i tried but it gave error 5 access deinied so i restarted my system and git and cargo didnt work so i checked my enviorment variables and they were all gone with only the diskwatcher there can someone help me plss
0
Upvotes
7
u/teerre May 23 '26
It's impossible to know what your code did and therefore impossible to help how to undo it
16
u/d47 May 23 '26
If you wrote the code, shouldn't you know what happened and how to undo it? If not, ask the AI that wrote it for you.
5
u/edparadox May 23 '26
I take it was not really your code, then?
At any rate, we cannot do anything to help you without knowing what you actually did, and what was in your PATH.
5
u/Difficult-Aspect3566 May 24 '26
This question does not seem related to Rust at all, if you are wondering how to restore path variable on Windows, you should ask in more appropriate place - forum about Windows, Windows support...
3
u/DavidXkL May 24 '26
Hard to know anything if the code isn't shown here
1
u/CrasseMaximum May 23 '26
Can you link the code?
1
u/dgkimpton May 23 '26
You'll have to look up the documentation for each tool you want to run and work out what the correct env vars are, then set them yourself. Since every system is a bit different this is probably something you'll have to work through yourself.
3
u/[deleted] May 23 '26
[removed] — view removed comment