Skip to content

Commit

Permalink
Fix lime.projectFile path that contains spaces (closes #104)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Jan 5, 2024
1 parent d2b8a80 commit 66d2aa6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lime/extension/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@ class Main
var projectFile = getProjectFile();
if (projectFile != "" && projectFile != "project.xml")
{
if (Sys.systemName() == "Windows")
{
// on windows, paths may be wrapped in quotes to include spaces
projectFile = "\"" + projectFile + "\"";
}
else
{
// on other platforms, a backslash preceding a string will
// include the space in the path
projectFile = ~/[ ]/g.replace(projectFile, "\\ ");
}
return StringTools.trim(command + " " + projectFile + " " + target + " " + args.join(" "));
}
else
Expand Down

0 comments on commit 66d2aa6

Please sign in to comment.