vladimirnani / DjangoCommands

ST2/ST3 plugin for managing django project
29 stars 14 forks source link

Commands with blank argument not working in Windows #41

Closed nathanjr closed 6 years ago

nathanjr commented 7 years ago

Hi,

I've been using DjangoCommands for a while in Windows 10 / ST3.

It's been very handy so thank you very much. I've been using the 'Run Server' and 'Terminal Here' commands mostly. I've found that a lot of the commands don't work for me, for example 'Shell'. The way that I've worked around this is to use the 'Custom Command' function to manually type the commands.

Example of the issue.

If I run 'Django: Shell'

image

image

Error in cmd: 'is not recognized as an internal or external command, operable program or batch file.'

ST3 log:

- Django: Command is : ['cmd.exe', '/k', 'C:\\Users\\Nathan Reah\\Envs\\iag-wallboards\\Scripts\\python', 'C:\\devprojects\\iag-wallboards\\manage.py', 'shell', '', '&&', 'timeout', '/T', '10', '&&', 'exit']

At first I thought that the issue was the space in my virtualenv path, but it turned out that the real issue was the blank list element being passed in command to subprocess.Popen in Windows.

I've fixed this in my own fork and will submit a pull request shortly, but just thought I'd raise an issue for others to find if they're having the same problem.

Cheers,

Nathan.