red / VScode-extension

Red extension for Visual Studio Code
Boost Software License 1.0
40 stars 17 forks source link

FIX: buildDir Path was wrong when no workspace was opened #9

Closed ghost closed 7 years ago

ghost commented 7 years ago

Closes #6

qtxie commented 7 years ago

Thank you very much for fixing it. :+1:

ghost commented 7 years ago

You are welcome 😉

geekyi commented 7 years ago

The logic seems a bit complex. I think it can be simplified further. @nc-x if you can figure it out?

ghost commented 7 years ago
case Commands.Red_Interpret:

and

case Commands.Red_Compile:

Both calculate the buildDir, so the whole buildDir code can be brought before the switch.

I might be able to do it. But it will be after 2-3 days because I have to submit college assignment day after tomorrow, and I am yet to start 😄 @geekyi If you would like to take over from here, I have no problem. Or I will try it on 17th, if I don't forget.

geekyi commented 7 years ago

If I knew how to do a pull request on a pull request, I'd do it 😛

geekyi commented 7 years ago

Sorry, I'd had the code and.. @qtxie I just thought, is there's any need to cd if you're not building i.e. compiling the .exe ? It should only change on case Commands.Red_Compile right?

qtxie commented 7 years ago

@geekyi Yes. I think you're right.