File tree Expand file tree Collapse file tree 6 files changed +34
-130
lines changed Expand file tree Collapse file tree 6 files changed +34
-130
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ junorc = client.import 'junorc', false
6
6
7
7
cycler = require ' ./process/cycler'
8
8
ssh = require ' ./process/remote'
9
- basic = require ' ./process/basic2 '
9
+ basic = require ' ./process/basic '
10
10
11
11
module .exports =
12
12
consumeGetServerConfig : (getconf ) ->
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,20 +19,32 @@ export function get (path, args) {
19
19
}
20
20
21
21
export function get_ ( path , args ) {
22
+ const env = customEnv ( )
23
+ if ( process . platform == 'win32' ) {
24
+ return getWindows ( path , args , env )
25
+ } else {
26
+ return getUnix ( path , args , env )
27
+ }
28
+ }
29
+
30
+ export function customEnv ( env = process . env ) {
22
31
let confnt = atom . config . get ( 'julia-client.juliaOptions.numberOfThreads' )
23
32
let confntInt = parseInt ( confnt )
24
33
25
34
if ( confnt == 'auto' ) {
26
- process . env . JULIA_NUM_THREADS = require ( 'physical-cpu-count' )
35
+ env . JULIA_NUM_THREADS = require ( 'physical-cpu-count' )
27
36
} else if ( confntInt != 0 && isFinite ( confntInt ) ) {
28
- process . env . JULIA_NUM_THREADS = confntInt
37
+ env . JULIA_NUM_THREADS = confntInt
29
38
}
30
39
31
- if ( process . platform == 'win32' ) {
32
- return getWindows ( path , args , process . env )
33
- } else {
34
- return getUnix ( path , args , process . env )
40
+ if ( atom . config . get ( 'julia-client.disableProxy' ) ) {
41
+ delete env . HTTP_PROXY
42
+ delete env . HTTPS_PROXY
43
+ delete env . http_proxy
44
+ delete env . https_proxy
35
45
}
46
+
47
+ return env
36
48
}
37
49
38
50
// TODO: reduce code duplication in getUnix and getWindows
Original file line number Diff line number Diff line change 1
1
{isEqual } = require ' underscore-plus'
2
- basic2 = require ' ./basic2 '
2
+ basic = require ' ./basic '
3
3
4
4
IPC = require ' ../ipc'
5
5
6
6
module .exports =
7
7
provider : ->
8
- basic2
8
+ basic
9
9
10
10
cacheLength : 1
11
11
Original file line number Diff line number Diff line change @@ -510,6 +510,15 @@ config =
510
510
type : ' array'
511
511
default : [' source.julia' , ' source.weave.md' , ' source.weave.latex' ]
512
512
order : 6
513
+ disableProxy :
514
+ title : ' Disable System Proxy for Child Processes'
515
+ description :
516
+ ' This unsets the `HTTP_PROXY` and `HTTPS_PROXY` environment variables in all integrated
517
+ terminals. Try this option if you\' re experiencing issues when installing Julia packages
518
+ in Juno.'
519
+ type : ' boolean'
520
+ default : false
521
+ order : 7
513
522
514
523
firstBoot :
515
524
type : ' boolean'
Original file line number Diff line number Diff line change 1
1
'use babel'
2
2
3
3
import { client } from '../connection'
4
+ import { customEnv } from '../connection/process/basic'
4
5
import { CompositeDisposable } from 'atom'
5
6
import { paths } from '../misc'
6
7
import modules from './modules'
@@ -308,11 +309,13 @@ function shellPty (cwd) {
308
309
} )
309
310
cwd = paths . home ( )
310
311
}
312
+ env = customEnv ( )
311
313
resolve ( {
312
314
pty : pty . fork ( atom . config . get ( "julia-client.consoleOptions.shell" ) , [ ] , {
313
315
cols : 100 ,
314
316
rows : 30 ,
315
- cwd : cwd
317
+ cwd : cwd ,
318
+ env : env
316
319
} ) ,
317
320
cwd : cwd } )
318
321
} else {
You can’t perform that action at this time.
0 commit comments