Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.53k stars 572 forks source link

Cmder syntax problem when setting git_install_root as start-up environment #2381

Closed roblon closed 2 years ago

roblon commented 2 years ago

Versions

ConEmu version status: 210304 OS version: Windows 10 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd

Problem description

This is a specific problem of Cmder ConEmu with git, buildin git does not work at all if you specify a system git install location using the startup setting environment then it does recognize git and it also configure it properly but it fails with the message “syntax error” when doing the standard console configuration afterwards, making impossible to have user aliases or user profile.

There must be a syntax error in the init.bat file after the git settings.

Steps to reproduce

  1. Intall Cmder into Windows 10
  2. Set the environment startup variable "git_install_root" from menu settings
  3. Start a new console and you get Syntaxerror

Actual results

Syntaxerror and no working user aliases or profile setting

Expected results

Working user aliases and profile setting

Additional files

Syntaxerror Setting

roblon commented 2 years ago

Exactly the same is happening with ConEmu version: 210912

Maximus5 commented 2 years ago

That is not a ConEmu message. Please check your cmder initialization scripts.

In other words - environment section is processed by ConEmu internally, even before starting the real console. And ConEmu definitely does not show "Syntaxfehler." errors (all messages from console part are in English for now).

My guess - your script does not support longs paths (with space in folder name).

roblon commented 2 years ago

Hello Maximus5,

It is definitely a problem of ConEmu, error message is in German because init.bat sets the locale when configuring git.

I can definitely exclude that the problem is because of the path, when I do set git from environment ConEmu finds it and it configures correctly, git works and ConEmu uses the passed git.

CmderAfterEnvSet

If I do not pass any environment variable (freshly installed ConEmu without setting any configuration) I don’t get any syntax error but git does not work at all.

CmderPlain

Maximus5 commented 2 years ago

It is definitely a problem of ConEmu

Why do you think so? If you run something buggy, ConEmu is not a magic instrument to fix this bug.

Again. This is cmder script problem.

roblon commented 2 years ago

It is definitely a problem of ConEmu

Why do you think so? If you run something buggy, ConEmu is not a magic instrument to fix this bug.

Again. This is cmder script problem.

There is nothing that could have a bug, there is no script where could be a Syntaxerror, I just add an environment variable and git is working afterwards, but even then if no environment variable is set and I just download Cmder (with built-in git) freshly installed without making any changes at all, git just does not work. So the only place where it could be a problem is Cmder startup…

Maximus5 commented 2 years ago

Please ask cmder-related questions on the cmder github issues. There are scripts which could have bugs. The message you see doesn't come from ConEmu.

https://conemu.github.io/en/cmder.html

roblon commented 2 years ago

Sorry Maximus,

I thought here was the issue tracker for Cmeder too, sorry again, have a nice day!