Skip to content

Commit

Permalink
Fixing global add in linux root folder #1029 (#1344)
Browse files Browse the repository at this point in the history
* Fixing global add in linux root folder #1029

* Changing global path to /usr/local/share
  • Loading branch information
lucaskatayama authored and Daniel15 committed Oct 31, 2016
1 parent 08f4284 commit f4fe743
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/* @flow */

const userHome = require('user-home');
const path = require('path');
let userHome = require('user-home');
if (process.platform === 'linux' && process.env.USER === 'root') {
userHome = path.resolve('/usr/local/share');
}

type Env = {[key: string]: ?string};
type Env = {
[key: string]: ? string
};

export const DEPENDENCY_TYPES = [
'devDependencies',
Expand Down

0 comments on commit f4fe743

Please sign in to comment.