File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export function get_ (path, args) {
26
26
27
27
export function customEnv ( env = process . env ) {
28
28
let confnt = atom . config . get ( 'julia-client.juliaOptions.numberOfThreads' )
29
+ let pkgServer = atom . config . get ( 'julia-client.juliaOptions.packageServer' )
29
30
let confntInt = parseInt ( confnt )
30
31
31
32
if ( confnt == 'auto' ) {
@@ -34,6 +35,10 @@ export function customEnv (env = process.env) {
34
35
env . JULIA_NUM_THREADS = confntInt
35
36
}
36
37
38
+ if ( pkgServer ) {
39
+ env . JULIA_PKG_SERVER = pkgServer
40
+ }
41
+
37
42
if ( atom . config . get ( 'julia-client.disableProxy' ) ) {
38
43
delete env . HTTP_PROXY
39
44
delete env . HTTPS_PROXY
Original file line number Diff line number Diff line change @@ -180,6 +180,9 @@ export function get_ (path, args) {
180
180
let sessionName = atom . config . get ( 'julia-client.remoteOptions.tmuxName' )
181
181
exec += `/bin/sh -c '`
182
182
exec += `tmux new -s ${ sessionName } '\\''`
183
+ if ( pkgServer ( ) ) {
184
+ exec += ` JULIA_PKG_SERVER="${ pkgServer ( ) } " `
185
+ }
183
186
if ( threadCount ( ) !== undefined ) {
184
187
exec += ` JULIA_NUM_THREADS="${ threadCount ( ) } " `
185
188
}
@@ -194,8 +197,11 @@ export function get_ (path, args) {
194
197
exec += `'`
195
198
} else {
196
199
exec += `/bin/sh -c '`
200
+ if ( pkgServer ( ) ) {
201
+ exec += ` JULIA_PKG_SERVER="${ pkgServer ( ) } " `
202
+ }
197
203
if ( threadCount ( ) !== undefined ) {
198
- exec += `JULIA_NUM_THREADS="${ threadCount ( ) } " `
204
+ exec += ` JULIA_NUM_THREADS="${ threadCount ( ) } " `
199
205
}
200
206
exec += `${ jlpath } ${ args . join ( ' ' ) } -e '\\''`
201
207
// could automatically escape single quotes with `replace(/'/, `'\\'\\\\\\'\\''`)`,
@@ -286,6 +292,10 @@ export function get_ (path, args) {
286
292
} )
287
293
}
288
294
295
+ function pkgServer ( ) {
296
+ return atom . config . get ( 'julia-client.juliaOptions.packageServer' )
297
+ }
298
+
289
299
function threadCount ( ) {
290
300
let confnt = atom . config . get ( 'julia-client.juliaOptions.numberOfThreads' )
291
301
let confntInt = parseInt ( confnt )
Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ config =
28
28
default : ' Basic'
29
29
radio : true
30
30
order : 1
31
+ packageServer :
32
+ title : ' Package Server'
33
+ type : ' string'
34
+ description : ' Julia package server. Set\' s the `JULIA_PKG_SERVER` environment
35
+ variable *before* starting a Julia process. Leave this empty to
36
+ use the systemwide default.
37
+ Requires a restart of the Julia process.'
38
+ default : ' '
39
+ order : 1.5
31
40
optimisationLevel :
32
41
title : ' Optimisation Level'
33
42
description : ' Higher levels take longer to compile, but produce faster code.'
You can’t perform that action at this time.
0 commit comments