racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

HOME environment variable incorrectly concatenated #30

Closed cnaj closed 8 years ago

cnaj commented 8 years ago

If CARGO_HOME is not set, racer tries to set it to the default location $HOME/.cargo. This variable doesn't necessarily end with a / (as on my OS X system), resulting in an invalid path in CARGO_HOME. cargo build then fails with an error:

cargo build --verbose
error: Permission denied (os error 13)

Compilation exited abnormally with code 101 at Sun Jul 10 18:52:03

To fix, the path in HOME should be converted to a path before concatenating.

dpc commented 8 years ago

I was just about the report the same issue:

https://github.com/racer-rust/emacs-racer/blob/master/racer.el#L82

cnaj commented 8 years ago

I've opened a pull request: #31