[BUG]: whkd(and komorebi_config_home don't accept $Env:USERPROFILE #304

Closed
opened 2026-01-05 14:49:37 +01:00 by adam · 2 comments
Owner

Originally created by @azinsharaf on GitHub (Feb 28, 2024).

Describe the bug
whkd_config_home doesn't accept $Env:USERPROFILE

To Reproduce
Steps to reproduce the behavior:

  1. use $Env:WHKD_CONFIG_HOME = '$Env:USERPROFILE\.config\whkd' in powershell profile.

  2. run whkd in terminal

  3. returns error: The application panicked (crashed). Message: $Env:WHKD_CONFIG_HOME is set to '$Env:USERPROFILE\.config\whkd', which is not a valid directory Location: src\main.rs:38

  4. but it works fine if i hardcode the full path in the profile file: $Env:WHKD_CONFIG_HOME = 'C:\Users\asharaf\.config\whkd'

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

komorebic check Output
Provide the output of komorebic check

thread 'main' panicked at komorebic\src\main.rs:70:21:
$Env:KOMOREBI_CONFIG_HOME is set to '$Env:USERPROFILE\.config\komorebi', which is not a valid directory
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Originally created by @azinsharaf on GitHub (Feb 28, 2024). **Describe the bug** whkd_config_home doesn't accept `$Env:USERPROFILE` **To Reproduce** Steps to reproduce the behavior: 1. use `$Env:WHKD_CONFIG_HOME = '$Env:USERPROFILE\.config\whkd'` in powershell profile. 2. run `whkd` in terminal 3. returns error: `The application panicked (crashed). Message: $Env:WHKD_CONFIG_HOME is set to '$Env:USERPROFILE\.config\whkd', which is not a valid directory Location: src\main.rs:38` 4. but it works fine if i hardcode the full path in the profile file: `$Env:WHKD_CONFIG_HOME = 'C:\Users\asharaf\.config\whkd'` **Operating System** ``` OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22631 N/A Build 22631 ``` **`komorebic check` Output** Provide the output of `komorebic check` ``` thread 'main' panicked at komorebic\src\main.rs:70:21: $Env:KOMOREBI_CONFIG_HOME is set to '$Env:USERPROFILE\.config\komorebi', which is not a valid directory note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
adam added the bug label 2026-01-05 14:49:37 +01:00
adam closed this issue 2026-01-05 14:49:37 +01:00
Author
Owner

@melMass commented on GitHub (Mar 21, 2024):

That's a windows thing.
Powershell like bash doesn't expand with single quotes.

> $Env:WHKD_CONFIG_HOME = '$Env:USERPROFILE\.config\whkd'
> $Env:WHKD_CONFIG_HOME
# '$Env:USERPROFILE\.config\whkd'
> $Env:WHKD_CONFIG_HOME = "$Env:USERPROFILE\.config\whkd"
> $Env:WHKD_CONFIG_HOME
# C:\Users\User\.config\whkd
@melMass commented on GitHub (Mar 21, 2024): That's a windows thing. Powershell like bash doesn't expand with single quotes. ```pwsh > $Env:WHKD_CONFIG_HOME = '$Env:USERPROFILE\.config\whkd' > $Env:WHKD_CONFIG_HOME # '$Env:USERPROFILE\.config\whkd' > $Env:WHKD_CONFIG_HOME = "$Env:USERPROFILE\.config\whkd" > $Env:WHKD_CONFIG_HOME # C:\Users\User\.config\whkd ```
Author
Owner

@azinsharaf commented on GitHub (Mar 21, 2024):

thank you so much! it worked!

@azinsharaf commented on GitHub (Mar 21, 2024): thank you so much! it worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#304