running provided emacs binary directly instead of running it via python which does not work well on windows.

listening to emacs return codes.
This commit is contained in:
Jan-Cornelius Molnar 2016-04-06 22:21:43 +02:00
parent 4fc7c724a5
commit d79eda0756
1 changed files with 29 additions and 31 deletions

View File

@ -33,15 +33,13 @@ module.exports = class FortranBeautifier extends Beautifier
tempFile = @tempFile("temp", text)
]
if emacs_path
args.unshift("#{emacs_path}")
@run("python", args, {ignoreReturnCode: true})
if emacs_path?
@run(emacs_path, args, {ignoreReturnCode: false})
.then(=>
@readFile(tempFile)
)
else
@run("emacs", args, {ignoreReturnCode: true})
@run("emacs", args, {ignoreReturnCode: false})
.then(=>
@readFile(tempFile)
)