Skip to content

Commit bc31982

Browse files
committed
Merge pull request #18 from jupyter/fix-path
Fix path
2 parents a8a3022 + 8e58718 commit bc31982

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

lib/main.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import path from 'path';
44
import React from 'react';
55
import ReactDOM from 'react-dom';
66
import {CompositeDisposable} from 'atom';
7+
import {delimiter} from 'path';
78
import Dispatcher from './dispatcher';
89
import NotebookEditor from './notebook-editor';
910
import NotebookEditorView from './notebook-editor-view';``
@@ -56,17 +57,20 @@ export default {
5657
};
5758

5859
function fixPath() {
59-
process.env.PATH = process.env.PATH.split(':').reduce((result, path) => {
60-
if (result.find(item => item === path)) result.push(path);
61-
return result;
62-
}, [
63-
'/usr/local/bin',
64-
'/usr/bin',
65-
'/bin',
66-
'/usr/local/sbin',
67-
'/usr/sbin',
68-
'/sbin'
69-
]).join(':');
60+
if (process.platform === 'darwin') {
61+
process.env.PATH = process.env.PATH.split(delimiter).reduce((result, path) => {
62+
if (!result.find(item => item === path)) result.push(path);
63+
return result;
64+
}, [
65+
'/usr/local/bin',
66+
'/usr/bin',
67+
'/bin',
68+
'/usr/local/sbin',
69+
'/usr/sbin',
70+
'/sbin',
71+
'./node_modules/.bin'
72+
]).join(delimiter);
73+
}
7074
}
7175

7276
function openURI(uriToOpen) {

0 commit comments

Comments
 (0)