diff --git a/boss/cli/template.py b/boss/cli/template.py index 9b8f246..885599a 100644 --- a/boss/cli/template.py +++ b/boss/cli/template.py @@ -262,7 +262,11 @@ def copy(self, dest_basedir): # first handle local files for tmpl_path in self._walk_path(self.basedir): - dest_path = fs.abspath(re.sub(self.basedir, dest_basedir, tmpl_path)) + # Fix "sre_constants.error: bogus escape: '\\U'" on Windows + basedir = self.basedir.replace('\\', '/') + destdir = dest_basedir.replace('\\', '/') + tmpl_path = tmpl_path.replace('\\', '/') + dest_path = fs.abspath(re.sub(basedir, destdir, tmpl_path)) self._copy_path(tmpl_path, dest_path) # second handle external files