From 64bfc99cc2a7219b8d46dc1001db5b67750cc65f Mon Sep 17 00:00:00 2001 From: lexicalunit Date: Wed, 17 Feb 2016 13:58:22 -0600 Subject: [PATCH] Normalize fs path. --- lib/python-isort.coffee | 6 +++--- package.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/python-isort.coffee b/lib/python-isort.coffee index 2290876..749000a 100644 --- a/lib/python-isort.coffee +++ b/lib/python-isort.coffee @@ -1,4 +1,4 @@ -fs = require 'fs' +fs = require 'fs-plus' $ = require 'jquery' process = require 'child_process' @@ -45,7 +45,7 @@ class PythonIsort return params = ["-ns", @getFilePath(), @getFilePath(), "-c", "-vb"] - isortpath = atom.config.get "python-isort.isortPath" + isortpath = fs.normalize(atom.config.get "python-isort.isortPath") which = process.spawnSync('which', ['isort']).status if which == 1 and not fs.existsSync(isortpath) @@ -66,7 +66,7 @@ class PythonIsort return params = ["-ns", @getFilePath(), @getFilePath(), "-vb"] - isortpath = atom.config.get "python-isort.isortPath" + isortpath = fs.normalize(atom.config.get "python-isort.isortPath") which = process.spawnSync('which', ['isort']).status if which == 1 and not fs.existsSync(isortpath) diff --git a/package.json b/package.json index 9c554c8..b303dde 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "atom": ">=0.185.0 <2.0.0" }, "dependencies": { + "fs-plus": "^2.8.1", "jquery": "^2.1.4" } }