From a7e5b8bfbe1a9b1790e3416259f4953f802ec809 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 24 Jul 2018 17:07:47 +0200 Subject: [PATCH] Improved project check for python and javascript --- src/project.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/project.cc b/src/project.cc index a0da6bb..b66f802 100644 --- a/src/project.cc +++ b/src/project.cc @@ -968,7 +968,7 @@ void Project::Markdown::compile_and_run() { void Project::Python::compile_and_run() { std::string command = Config::get().project.python_command + ' '; boost::filesystem::path path; - if(!build->project_path.empty()) { + if(dynamic_cast(build.get())) { command += filesystem::get_short_path(build->project_path).string(); path = build->project_path; } @@ -994,7 +994,7 @@ void Project::Python::compile_and_run() { void Project::JavaScript::compile_and_run() { std::string command; boost::filesystem::path path; - if(!build->project_path.empty()) { + if(dynamic_cast(build.get())) { command = "npm start"; path = build->project_path; }