File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import * as cp from "child_process" ;
2
2
import * as os from "os" ;
3
+ import * as path from "path" ;
3
4
import { setUnexpectedErrorHandler } from "vs/base/common/errors" ;
4
5
import { main as vsCli } from "vs/code/node/cliProcessMain" ;
5
6
import { validatePaths } from "vs/code/node/paths" ;
@@ -73,7 +74,15 @@ const getArgs = (): Args => {
73
74
74
75
options . push ( last ) ;
75
76
76
- return validatePaths ( parseMainProcessArgv ( process . argv ) ) ;
77
+ const args = parseMainProcessArgv ( process . argv ) ;
78
+ if ( ! args [ "user-data-dir" ] ) {
79
+ args [ "user-data-dir" ] = path . join ( process . env . XDG_DATA_HOME || path . join ( os . homedir ( ) , ".local/share" ) , "code-server" ) ;
80
+ }
81
+ if ( ! args [ "extensions-dir" ] ) {
82
+ args [ "extensions-dir" ] = path . join ( args [ "user-data-dir" ] , "extensions" ) ;
83
+ }
84
+
85
+ return validatePaths ( args ) ;
77
86
} ;
78
87
79
88
const startVscode = async ( ) : Promise < void | void [ ] > => {
You can’t perform that action at this time.
0 commit comments