File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ export class SQLJobManager {
24
24
25
25
async newJob ( predefinedJob ?: SQLJob , name ?: string ) {
26
26
if ( ServerComponent . isInstalled ( ) ) {
27
- const features = osDetail . getFeatures ( ) ;
28
27
29
28
const instance = getInstance ( ) ;
30
29
const config = instance . getConfig ( ) ;
@@ -42,9 +41,12 @@ export class SQLJobManager {
42
41
try {
43
42
await newJob . connect ( ) ;
44
43
45
- const selfDefault = SQLJobManager . getSelfDefault ( ) ;
46
- if ( features . SELF && selfDefault !== `*NONE` ) {
47
- await newJob . setSelfState ( selfDefault ) ;
44
+ if ( osDetail ) {
45
+ const features = osDetail . getFeatures ( ) ;
46
+ const selfDefault = SQLJobManager . getSelfDefault ( ) ;
47
+ if ( features . SELF && selfDefault !== `*NONE` ) {
48
+ await newJob . setSelfState ( selfDefault ) ;
49
+ }
48
50
}
49
51
50
52
this . totalJobs += 1 ;
You can’t perform that action at this time.
0 commit comments