Skip to content

Commit

Permalink
Correct ninja syntax on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Sep 21, 2023
1 parent 09bf21a commit 71c5f6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lib/gftools/builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dataclasses import dataclass
import os.path
import networkx as nx
from ninja.ninja_syntax import Writer
from ninja.ninja_syntax import Writer, escape_path
from fontmake.font_project import FontProject

from gftools.builder.file import File
Expand Down Expand Up @@ -247,7 +247,7 @@ def walk_graph(self):
edge["operation"].validate()
actions[(source, edge["operation"])].append(target)
if not list(self.graph.successors(target)):
final_targets.append(target.path)
final_targets.append(escape_path(target.path))

for (source, operation), targets in actions.items():
operation.build(self.writer)
Expand Down
5 changes: 3 additions & 2 deletions Lib/gftools/builder/operations/instantiateUfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gftools.builder
from functools import cached_property
from glyphsLib.builder import UFOBuilder
from ninja.ninja_syntax import Writer, escape_path
from fontTools.designspaceLib import InstanceDescriptor


Expand Down Expand Up @@ -52,9 +53,9 @@ def targets(self):
def variables(self):
vars = super().variables
if self.first_source.is_glyphs:
vars["fontmake_args"] += f"--instance-dir '{self.instance_dir}'"
vars["fontmake_args"] += f"--instance-dir {escape_path(str(self.instance_dir))}"
else:
vars["fontmake_args"] += f"--output-dir '{self.instance_dir}'"
vars["fontmake_args"] += f"--output-dir {escape_path(str(self.instance_dir))}"
vars["instance_name"] = self.original["instance_name"]
return vars

Expand Down

0 comments on commit 71c5f6f

Please sign in to comment.