File tree Expand file tree Collapse file tree 1 file changed +18
-17
lines changed
components/ide/jetbrains/image/status Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,25 @@ func main() {
90
90
log .Info (ServiceName + ": " + Version )
91
91
startTime := time .Now ()
92
92
93
- // status warmup intellij
94
- // status port alias label
95
-
96
- if len (os .Args ) < 3 {
97
- log .Fatalf ("Usage: %s <port> <kind> [<link label>]\n " , os .Args [0 ])
98
- }
99
-
100
93
var port string
101
94
var warmup bool
102
95
96
+ if len (os .Args ) < 2 {
97
+ log .Fatalf ("Usage: %s (warmup|<port>)\n " , os .Args [0 ])
98
+ }
99
+
103
100
if os .Args [1 ] == "warmup" {
101
+ if len (os .Args ) < 2 {
102
+ log .Fatalf ("Usage: %s <alias>\n " , os .Args [0 ])
103
+ }
104
+
104
105
warmup = true
105
106
} else {
106
- port := os .Args [1 ]
107
+ if len (os .Args ) < 3 {
108
+ log .Fatalf ("Usage: %s <port> <kind> [<link label>]\n " , os .Args [0 ])
109
+ }
110
+
111
+ port = os .Args [1 ]
107
112
}
108
113
109
114
alias := os .Args [2 ]
@@ -142,9 +147,10 @@ func main() {
142
147
launchCtx := & LaunchContext {
143
148
startTime : startTime ,
144
149
145
- port : port ,
146
- alias : alias ,
147
- label : label ,
150
+ warmup : warmup ,
151
+ port : port ,
152
+ alias : alias ,
153
+ label : label ,
148
154
149
155
qualifier : qualifier ,
150
156
productDir : productDir ,
@@ -154,12 +160,7 @@ func main() {
154
160
wsInfo : wsInfo ,
155
161
}
156
162
157
- // if len(os.Args) == 3 && os.Args[1] == "warmup" {
158
-
159
- // }
160
-
161
- if os .Args [1 ] == "warmup" {
162
- launchCtx .warmup = true
163
+ if launchCtx .warmup {
163
164
launch (launchCtx )
164
165
return
165
166
}
You can’t perform that action at this time.
0 commit comments