Skip to content

Commit a151b23

Browse files
authored
Fix 'cfn generate' on Windows systems (#170)
Pathlib by default converts the path format to Windows style on Windows machines. But the 'main.go' generated does not accept windows style paths.
1 parent 3b61e51 commit a151b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/rpdk/go/codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def generate(self, project):
170170
LOG.debug("Writing project: %s", path)
171171
template = self.env.get_template("main.go.tple")
172172
importpath = Path(project.settings["import_path"])
173-
contents = template.render(path=importpath / "cmd" / "resource")
173+
contents = template.render(path=(importpath / "cmd" / "resource").as_posix())
174174
project.overwrite(path, contents)
175175
format_paths.append(path)
176176

0 commit comments

Comments
 (0)