Merge pull request #1011 from mweberaw/master

fixed order of home-dir expansion and project resolution
This commit is contained in:
Glavin Wiechert 2016-06-23 19:36:36 -03:00 committed by GitHub
commit c217a63ea1
1 changed files with 2 additions and 3 deletions

View File

@ -37,6 +37,8 @@ module.exports = class Uncrustify extends Beautifier
editor = atom.workspace.getActiveTextEditor() editor = atom.workspace.getActiveTextEditor()
if editor? if editor?
basePath = path.dirname(editor.getPath()) basePath = path.dirname(editor.getPath())
# Expand Home Directory in Config Path
configPath = expandHomeDir(configPath)
# console.log(basePath); # console.log(basePath);
configPath = path.resolve(basePath, configPath) configPath = path.resolve(basePath, configPath)
resolve configPath resolve configPath
@ -45,9 +47,6 @@ module.exports = class Uncrustify extends Beautifier
) )
.then((configPath) => .then((configPath) =>
# Expand Home Directory in Config Path
configPath = expandHomeDir(configPath)
# Select Uncrustify language # Select Uncrustify language
lang = "C" # Default is C lang = "C" # Default is C
switch language switch language