@@ -135,8 +135,25 @@ protected function isBigSurUp()
135135 {
136136 if ($ v = $ this ->getOs ()->getVersion ())
137137 {
138- // In some early testing, the version returned was 10.18 or something silly
139- if (11 == $ v ->getMajor () || 10 == $ v ->getMajor () && $ v ->getMinor () >= 16 )
138+ if ($ v ->getMajor () >= 11 )
139+ {
140+ return true ;
141+ }
142+ }
143+
144+ return false ;
145+ }
146+
147+ /**
148+ * Determines if the OS version is Big Sur or greater.
149+ *
150+ * @return bool
151+ */
152+ protected function isMontereyUp ()
153+ {
154+ if ($ v = $ this ->getOs ()->getVersion ())
155+ {
156+ if ($ v ->getMajor () >= 12 )
140157 {
141158 return true ;
142159 }
@@ -154,7 +171,7 @@ protected function isCatalinaUp()
154171 {
155172 if ($ v = $ this ->getOs ()->getVersion ())
156173 {
157- if (11 == $ v ->getMajor () || 10 == $ v ->getMajor () && $ v ->getMinor () >= 15 )
174+ if ($ v ->getMajor () >= 11 || ( 10 == $ v ->getMajor () && $ v ->getMinor () >= 15 ) )
158175 {
159176 return true ;
160177 }
@@ -172,7 +189,7 @@ protected function isMojaveUp()
172189 {
173190 if ($ v = $ this ->getOs ()->getVersion ())
174191 {
175- if (11 == $ v ->getMajor () || 10 == $ v ->getMajor () && $ v ->getMinor () >= 14 )
192+ if ($ v ->getMajor () >= 11 || ( 10 == $ v ->getMajor () && $ v ->getMinor () >= 14 ) )
176193 {
177194 return true ;
178195 }
@@ -260,7 +277,9 @@ protected function getLaunchUserId()
260277
261278 protected function getLaunchMethod ()
262279 {
263- return $ this ->getOs ()->getVersion ()->getMinor () <= 9 ? 'bsexec ' : 'asuser ' ;
280+ $ version = $ this ->getOs ()->getVersion ();
281+
282+ return ($ version ->getMajor () > 10 || $ version ->getMinor () > 9 ) ? 'asuser ' : 'bsexec ' ;
264283 }
265284
266285 /**
0 commit comments