Stubbs / sublime-vagrant

Vagrant commands for Sublime Text
43 stars 4 forks source link

[Bug] vagrantfile_path setting don't work #35

Open Kristinita opened 7 years ago

Kristinita commented 7 years ago

1. Summary

It would be nice, if SublimeVagrant may find Vagrantfile in any sidebar folder, not exclusively in top sidebar folder.

2. Settings

My User/Vagrant.sublime-settings file:

{
    "output_to_window": true,
    "vagrant_path": "C:\\HashiCorp\\Vagrant\\bin\\vagrant.exe",
    "vagrantfile_path": "D:\\chocolatey-test-environment\\Vagrantfile"
}

chocolatey-test-environment sidebar folder — is folder with my Vagrantfile. Others folders — don't have Vagrantfile.

3. Expected behavior

If chocolatey-test-environment folder in top of my sidebar, Vagrant commands run successful.

Top

4. Actual behavior

But if chocolatey-test-environment folder not in top of my sidebar, Vagrant commands don't run.

Not top

I get in Sublime Text console:

Searching : D:\CriticMarkup
Unable to find Vagrantfile, found .git folder and assumed this is the root of your project.

SublimeVagrant don't see vagrantfile_path setting.

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

If chocolatey-test-environment folder in top of my sidebar, I get expected behavior.

If chocolatey-test-environment folder not in top of my sidebar, I get expected behavior.

6. Environment

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126 Vagrant: 1.9.1

Thanks.

daverosoff commented 6 years ago

This is old, and there have not been any new commits or responses to issues in quite some time, but the problem here is that you only need the parent directory of the Vagrantfile as the value of vagrantfile_path. That is, if you have C:\Path\To\Vagrant\Vagrantfile as your Vagrantfile, use

"vagrantfile_path": "C:\\Path\\To\\Vagrant"

in your Vagrant.sublime-settings.