Commit ff6cfba 1 parent 1ef28bf commit ff6cfba Copy full SHA for ff6cfba
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class SystemdProcessManager extends cli.ProcessManager {
28
28
execa . shellSync ( `systemctl is-enabled ${ this . systemdName } ` ) ;
29
29
return true ;
30
30
} catch ( e ) {
31
+ // Systemd prints out "disabled" if service isn't enabled
31
32
if ( ! e . message . match ( / d i s a b l e d / ) ) {
32
33
throw e ;
33
34
}
@@ -51,9 +52,8 @@ class SystemdProcessManager extends cli.ProcessManager {
51
52
execa . shellSync ( `systemctl is-active ${ this . systemdName } ` ) ;
52
53
return true ;
53
54
} catch ( e ) {
54
- // systemctl is-active returns exit code 3 when a service isn't active,
55
- // so throw if we don't have that.
56
- if ( e . code !== 3 ) {
55
+ // Systemd prints out "inactive" if service isn't running
56
+ if ( ! e . message . match ( / i n a c t i v e / ) ) {
57
57
throw e ;
58
58
}
59
59
You can’t perform that action at this time.
0 commit comments