File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,19 @@ import {
9
9
getBundledPythonPath ,
10
10
installBundledEnvironment ,
11
11
isDevMode ,
12
+ isSnap ,
12
13
jlabCLICommandIsSetup ,
13
14
setupJlabCommandWithUserRights ,
14
15
versionWithoutSuffix ,
15
16
waitForDuration ,
16
17
waitForFunction
17
18
} from './utils' ;
19
+
20
+ if ( isSnap ( ) ) {
21
+ app . setPath ( 'home' , process . env . HOME ) ;
22
+ app . setPath ( 'userData' , `${ process . env . HOME } /.config/${ app . getName ( ) } ` ) ;
23
+ }
24
+
18
25
import { JupyterApplication } from './app' ;
19
26
import { ICLIArguments } from './tokens' ;
20
27
import { SessionConfig } from './config/sessionconfig' ;
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ export function isDevMode(): boolean {
30
30
return require . main . filename . indexOf ( 'app.asar' ) === - 1 ;
31
31
}
32
32
33
+ export function isSnap ( ) : boolean {
34
+ return process . platform === 'linux' && process . env . SNAP !== undefined ;
35
+ }
36
+
33
37
export function getAppDir ( ) : string {
34
38
let appDir = app . getAppPath ( ) ;
35
39
if ( ! isDevMode ( ) ) {
You can’t perform that action at this time.
0 commit comments