Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init.bat fails and shows {lamb} and {git} #935

Closed
denisz1 opened this issue May 2, 2016 · 14 comments
Closed

init.bat fails and shows {lamb} and {git} #935

denisz1 opened this issue May 2, 2016 · 14 comments

Comments

@denisz1
Copy link

denisz1 commented May 2, 2016

For the latest pre release
The init.bat fails, and the prompt is all wrong

File fails here:

if not exist "%CMDER_ROOT%\config\settings" (
    echo Generating clink initial settings in %CMDER_ROOT%\config\settings
    echo Additional *.lua files in %CMDER_ROOT%\config are loaded on startup.
) 

There is another location in the bat file with the same problem.

@jankatins
Copy link
Contributor

jankatins commented May 2, 2016

What is the error message?

@denisz1
Copy link
Author

denisz1 commented May 2, 2016

UPDATE: BUGFIX FOUND

I fixed it by adding quotation marks. Do the following:

Change this:

    echo Generating clink initial settings in %CMDER_ROOT%\config\settings
    echo Additional *.lua files in %CMDER_ROOT%\config are loaded on startup.

To this:

    echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
    echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.

And change this:

    echo Creating intial aliases in %CMDER_ROOT%\config\aliases

To this:

    echo Creating intial aliases in "%CMDER_ROOT%\config\aliases"

Then it installs and runs as expected.

@jankatins
Copy link
Contributor

Ok, can you please still post the error message and also the path where you installed cmder in? I suspect that it as something to do with spaces in your path, but actually can't really understand the problem because it is just a echoed variable and not something which is used programmatically (like the if not exist "%CMDER_ROOT%\config\settings" ( line).

@denisz1
Copy link
Author

denisz1 commented May 2, 2016

There was no error. It didn't run far enough to install clink. So like others have reported, the prompt said {lamb} instead of the lambda sign, and the {git} substitutions were not made. And all paths were correct. It was a brand new install.

Others have reported that it was because of an old version of clink, but that's not it. It was not running clink, because the batch file failed at those lines. Makes no sense, btu there you go.

Win10 x64 BTW.

@jankatins
Copy link
Contributor

There was no error.

No error message at all when you opened a new cmder window? Also: what is the full path to your cmder install location (e.g. in my case: C:\Users\jschulz\Dropbox\Programme\cmder\Cmder.exe)?

@denisz1
Copy link
Author

denisz1 commented May 2, 2016

No, no error. But clink didn't run, so the macros were not expanded, and the shell was not "upgraded" in the cmder style.

c:\Program Files (x86)\foo\bar\cmder\Cmder.exe

@denisz1
Copy link
Author

denisz1 commented May 5, 2016

Obviously this is not just me, and obviously the fix works for others too, see @elonliu.
I'll leave this open until it's fixed and closed by one of the devs.

jankatins added a commit to jankatins/cmder that referenced this issue May 5, 2016
This should prevent errors like
cmderdev#935
cmderdev#937

I've no idea why this happens, but it shouldn't hurt anyway...
jankatins added a commit to jankatins/cmder that referenced this issue May 5, 2016
This should prevent errors like
cmderdev#935
cmderdev#937

I've no idea why this happens, but it shouldn't hurt anyway...
jankatins added a commit to jankatins/cmder that referenced this issue May 5, 2016
This should prevent errors like
cmderdev#935
cmderdev#937

I've no idea why this happens, but it shouldn't hurt anyway...
@jankatins
Copy link
Contributor

@jankatins
Copy link
Contributor

Could you also do me a favor and remove the @echo off at the start of the failing init.bat and report the output here? I can't reproduce in a c:\temp\test test\ dir :-(

@denisz1
Copy link
Author

denisz1 commented May 6, 2016

I get the same as @elonliu:

"\cmder\config\settings was unexpected at this time"

And after that nothing, it just crashes back to the command line.

Also, for me its installed in a path with spaces: ...\Program Files (x86)\...

@jankatins
Copy link
Contributor

Ok, I think I found the problem: if the path has parentheses in it, it fails: C:\temp\test (test) does not work in the old version and in the current version, it still gives an error somewhere:

Enhancing PATH with unix commands from git [C:\Program Files\Git]
"\config\user-aliases.cmd" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

@jankatins
Copy link
Contributor

See #941 for more such changes...

@denisz1
Copy link
Author

denisz1 commented May 7, 2016

awesome 😃

@denisz1 denisz1 closed this as completed May 7, 2016
@BrainCrumbz
Copy link

BrainCrumbz commented May 30, 2016

Hello there

we tried the 1.0.267 mini zip, and {lamb}, {git}, {hg}, cmder\config\settings issues disappeared. But now we see (translated from italian):

INFORMATION: cannot find any file corresponding to indicated search criteria.
\cmder\config\user-aliases.cmd unexpected.

Is there any newer CI build output we can try? Thanks for this great software!

EDIT
The 2nd message seems to be fixed with the following in vendor\init.bat:

:: BEFORE
if not defined aliases (
  set aliases=%user-aliases%
)
:: AFTER
if not defined aliases (
  set aliases="%user-aliases%"
)

BTW, if it can help, I can confirm that in our PC setup, with Windows 10 64 bits, cmder is copied under C:\Program Files (x86), so there are parenthesis in path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants