vagrant under cmder on Windows 10 does nothing; works under cmd.exe

2

I have a fresh Windows 10 64-bit install, which I'm attempting to set up for development.

I have

  • downloaded and installed cmder, then rebooted
  • downloaded and installed Vagrant, then rebooted
  • downloaded and installed VirtualBox, then rebooted
  • set VAGRANT_HOME=c:\vagrant
  • used VBoxManage setproperty machinefolder c:\virtualbox-machines
  • acquired my department's VagrantFile, and modified it to suit my filesystem.

In cmder, if I now run

vagrant box add http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box --name chef/centos-7.0

I get no output. No failure codes, no windows errors, no logs from vagrant. The same is true of all vagrant commands, up to and including vagrant --version and vagrant --help. Other commands work fine in cmder.

However, if I run a basic command line, cmd.exe, then the vagrant box add command completes correctly. An, as far as I know, identical setup worked under Windows 7 32-bit.

Can anyone suggest what might be going wrong?

Chowlett

Posted 2017-07-10T11:20:45.057

Reputation: 253

>

  • ConEmu version. 2. Screenshots after executing vagrant commands.
  • < – Maximus – 2017-07-10T23:34:34.157

    1@Maximus - ConEmu looks like ConEmu 161022 [32] (which is a little odd, because it's a Windows 10 64-bit install - but that's what came with cmder). There's no point getting screenshots - there is literally nothing after running a vagrant command. Just one blank line, then the next prompt. – Chowlett – 2017-07-11T08:00:13.270

    Update ConEmu to latest alpha – Maximus – 2017-07-11T12:18:01.697

    1@Maximus - now running 170709 [64]; no change. Still no output from (for instance) vagrant --version. – Chowlett – 2017-07-11T12:37:20.257

    A coworker on windows had this problem this morning, he was using latest stable and latest version of cmder both facing this issue. I asked him to use conemu directly instead, he installed conemu using chocolatey and now his vagrant command works. – GabLeRoux – 2017-07-11T12:58:41.767

    @GabLeRoux - if I run ConEmu64.exe directly from cmder\vendor\conemu-maximus5, I still have the same symptom - no output. I don't know if cmder is hijacking the console behind the scenes, though. – Chowlett – 2017-07-11T13:14:50.193

    @GabLeRoux - ah! But running it from its own directory does appear to work. – Chowlett – 2017-07-11T13:22:53.867

    Try to disable clink. Or http://conemu.github.io/en/FaqPlainShell.html#cmd

    – Maximus – 2017-07-11T16:12:59.520

    @Maximus How do I disable clink? Its checkbox is off in cmder's settings, but it may be active globally. Also, how do I tell cmder to use ConEmu basic? I can't work out where the -basic switch should go. (Incidentally, my system has been re-imaged to Windows 7 64-bit, and the problem is persisting). – Chowlett – 2017-07-12T09:32:58.053

    The link I've posted shows the command you shall run. Exactly. From Win+R fo example. – Maximus – 2017-07-12T14:00:19.717

    @Maximus - If I run ConEmu directly everything works fine. It's only if I run it through cmder that things fail. How do I add in the -basic switch to cmder's invocation of ConEmu? – Chowlett – 2017-07-12T14:02:31.690

    Delete clink folder, edit cmder batch initialization file (remove clink calls), uncheck clink checkbox in ConEmu settings. – Maximus – 2017-07-12T17:54:01.693

    Actually, I see no sense in cmder, hotkeys and color theme are configurable in ConEmu itself. – Maximus – 2017-07-12T17:54:50.633

    Answers

    3

    There is something wrong with the git-for-windows that is vendored with cmder and vagrant. However, cmder allows you to have your own install of git-for-windows.

    To fix this issue with vagrant working and cmder:

    1. Install git for windows from https://git-scm.com/
    2. Ensure your PATH includes the path to the git you just installed (default should be: C:\Program Files\Git\cmd)
    3. Restart cmder

    Cmder should then detect the custom git install and use that and there will no longer be a problem with vagrant.

    Editing the cmder vender\init.bat is not a great solution because this can be replaced by cmder in a future update.

    Jon Cahill

    Posted 2017-07-10T11:20:45.057

    Reputation: 146

    0

    Hey I just talked with the guy who had the problem here at the office, he said the problem was related to its $PATH not being set correctly for git.exe.

    Problem is with the way C:\Tools\cmder\vendor\init.bat loads git. (I still don't know why git have anything to do with preventing vagrant from running).

    1. Make sure C:\Tools\cmder\bin; comes first in the list
    2. Remove cmder's git-for-windows (he also renamed it to a different path just to make sure it doesn't get used by cmder).
    3. Use official git binaries and add C:\Program Files\Git\usr\bin; to to your PATH.

    After doing this, he was able to run vagrant commands from cmder like before. Hope it helps. Good luck!

    GabLeRoux

    Posted 2017-07-10T11:20:45.057

    Reputation: 318