Closes #235. Add tilda (~) support for Uncrustify config paths

This commit is contained in:
Glavin Wiechert 2015-03-16 01:54:27 -03:00
parent 7ea50c6131
commit bc14c04f84
2 changed files with 6 additions and 2 deletions

View File

@ -5,12 +5,15 @@ Requires http://uncrustify.sourceforge.net/
cliBeautify = require("../cli-beautify") cliBeautify = require("../cli-beautify")
cfg = require("./cfg") cfg = require("./cfg")
path = require("path") path = require("path")
expandHomeDir = require('expand-home-dir')
getCmd = (inputPath, outputPath, options, cb) -> getCmd = (inputPath, outputPath, options, cb) ->
uncrustifyPath = options.uncrustifyPath uncrustifyPath = options.uncrustifyPath
# console.log('Uncrustify options:', options); # console.log('Uncrustify options:', options);
# console.log("Uncrustify path: #{uncrustifyPath}") # console.log("Uncrustify path: #{uncrustifyPath}")
# Complete callback # Complete callback
done = (configPath) -> done = (configPath) ->
# Expand Home Directory in Config Path
configPath = expandHomeDir(configPath)
# console.log(configPath); # console.log(configPath);
if uncrustifyPath if uncrustifyPath
# Use path given by user # Use path given by user

View File

@ -51,9 +51,11 @@
"analytics-node": "^1.0.2", "analytics-node": "^1.0.2",
"async": "^0.9.0", "async": "^0.9.0",
"atom-message-panel": "^1.1.1", "atom-message-panel": "^1.1.1",
"atom-space-pen-views": "^2.0.3",
"coffee-formatter": "^0.1.1", "coffee-formatter": "^0.1.1",
"editorconfig": "^0.11.4", "editorconfig": "^0.11.4",
"emissary": "^1.0.0", "emissary": "^1.0.0",
"expand-home-dir": "0.0.2",
"extend": "^1.2.1", "extend": "^1.2.1",
"js-beautify": "^1.5.5", "js-beautify": "^1.5.5",
"lodash": "2.4.1", "lodash": "2.4.1",
@ -65,8 +67,7 @@
"strip-json-comments": "^0.1.3", "strip-json-comments": "^0.1.3",
"temp": "^0.8.0", "temp": "^0.8.0",
"typescript-formatter": "~0.1.4", "typescript-formatter": "~0.1.4",
"yaml-front-matter": "^3.2.3", "yaml-front-matter": "^3.2.3"
"atom-space-pen-views": "^2.0.3"
}, },
"activationCommands": { "activationCommands": {
"atom-workspace": [ "atom-workspace": [