File tree 1 file changed +18
-0
lines changed
components/ide/jetbrains/image/status
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ func main() {
84
84
}
85
85
}
86
86
87
+ err = configureXmx (alias )
88
+ if err != nil {
89
+ log .WithError (err ).Error ("failed to configure backend Xmx" )
90
+ }
87
91
go run (wsInfo )
88
92
89
93
http .HandleFunc ("/joinLink" , func (w http.ResponseWriter , r * http.Request ) {
@@ -254,6 +258,20 @@ func remoteDevServerCmd(args []string) *exec.Cmd {
254
258
return cmd
255
259
}
256
260
261
+ func configureXmx (alias string ) error {
262
+ xmx := os .Getenv (strings .ToUpper (alias ) + "_XMX" )
263
+ if xmx == "" {
264
+ return nil
265
+ }
266
+ launcherPath := "/ide-desktop/backend/plugins/remote-dev-server/bin/launcher.sh"
267
+ content , err := ioutil .ReadFile (launcherPath )
268
+ if err != nil {
269
+ return err
270
+ }
271
+ newContent := strings .Replace (string (content ), "2048m" , xmx , 1 )
272
+ return ioutil .WriteFile (launcherPath , []byte (newContent ), 0 )
273
+ }
274
+
257
275
/**
258
276
{
259
277
"buildNumber" : "221.4994.44",
You can’t perform that action at this time.
0 commit comments