-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Version Information
Cmder version: v1.3.21
Operating system: Windows 11Cmder Edition
Cmder Full (with Git)
Description of the issue
If a Windows Environment Variable from system settings is defined using another environment variables it is not expanded when using CMD.exe inside Cmder.
Example:
ANDROID_HOME=%LOCALAPPDATA%\Android\Sdk
(not just ANDROID_HOME other similar variables do not get expanded as well)
When opening CMD.exe directly (without Cmder) the path is expanded correctly as follows:
> echo %ANDROID_HOME%
C:\Users\user.name\AppData\Local\Android\Sdk
If I print the same variable in CMD.exe from within Cmder then the path is not correct:
> echo %ANDROID_HOME%
%LOCALAPPDATA%\Android\Sdk
This means that when building an android application from the command line it only works in CMD.exe directly but fails from within Cmder
How to reproduce
- Set the environment variable ANDROID_HOME=%LOCALAPPDATA%\Android\Sdk from windows settings
- open Cmder with a cmd.exe console
- type
echo %ANDROID_HOME%and press ENTER - Observe the command output in the console, the path is not expanded properly
Additional context
Setting the environment variables from the Cmder settings: startup/environement the variables are expanded correctly.
A workaround for me is currently to define the variables twice: in the windows system settings and in Cmder settings.
It would be best if the variable expansion is working without the need to also duplicate it in Cmder
Checklist
- I have read the documentation.
- I have searched for similar issues and found none that describe my issue.
- I have reproduced the issue on the latest version of Cmder.
- I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.
