So I came back to my candy machine on devnet to adjust the guards and when I run:

sugar guard show

I get this error:

[1/1] Loading candy guard thread 'main' panicked at 'Couldn't find Windows home drive key.', src\parse.rs:14:46 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

The command worked the other day but today this error. Is there something I must reset/configure when I come back to the candy machine? I have run solana config set -u devnet successfully.

Thanks in advance.

1 Answer 1


sugar detects that you are on windows and is looking for the HOMEDRIVE env variable, which is not set, or maybe doesn't have access to.

It uses HOMEDRIVE and HOMEPATH env vars to get the path where the solana config file is. Something like ~/.config/solana/cli/config.yml.

Make sure these env variables are set and available where you're running sugar.

  • Thanks you. Yes I had installed Solana as administrator, but was logged in as a different user when running the sugar commands, and it was looking in the wrong place for config.yml. Appreciate you pointing me to the solution!
    – Newbie
    Commented Aug 4, 2023 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.