From ee9a596188011c912ca12686a5fb35431a613a68 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 12 Mar 2014 19:21:57 -0700 Subject: [PATCH] swc-windows-installer.py: Use POSIX paths for ~/nano.rc On Wed, Mar 12, 2014 at 06:34:43PM -0700, Ethan White wrote [1]: > The bash script in #228 is now working properly, but the Python > script is still failing. It reports errors like: > > Error reading ~\.swc\share\nanorc\doc\syntax\python.nanorc > > The obvious difference is that the nano.rc files produced by the > bash script have `/` for paths for the includes, but the Python > script produces includes that use `\`. [1]: https://github.com/swcarpentry/bc/pull/357#issuecomment-37491038 --- swc-windows-installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swc-windows-installer.py b/swc-windows-installer.py index fe7af74..3fee893 100755 --- a/swc-windows-installer.py +++ b/swc-windows-installer.py @@ -132,7 +132,7 @@ def install_nanorc(install_directory): if filename.endswith('.nanorc'): path = os.path.join(syntax_dir, filename) rel_path = os.path.relpath(path, home) - include_path = os.path.join('~', rel_path) + include_path = make_posix_path(os.path.join('~', rel_path)) f.write('include {}\n'.format(include_path)) -- 2.26.2