classes/phing/tasks/system/ExecTask.php
protected function isValidOs(): bool
    {
        //hand osfamily off to OsCondition class, if set
        if ($this->osFamily !== null && !OsCondition::isFamily($this->osFamily)) {
            return false;
        }
        //the Exec OS check is different from Os.isOs(), which
        //probes for a specific OS. Instead it searches the os field
        //for the current os.name
        $myos = Phing::getProperty("os.name");
        $this->log("Current OS is " . $myos, Project::MSG_VERBOSE);
        if (($this->os !== null) && (strpos($this->os, $myos) === false)) {
            // this command will be executed only on the specified OS
            $this->log(
                "This OS, " . $myos
                . " was not found in the specified list of valid OSes: " . $this->os,
                Project::MSG_VERBOSE
            );
            return false;
        }
        return true;
    }
protected function isValidOs(): bool
    {
        //hand osfamily off to OsCondition class, if set
        if ($this->osFamily !== null && !OsCondition::isFamily($this->osFamily)) {
            return false;
        }
        //the Exec OS check is different from Os.isOs(), which
        //probes for a specific OS. Instead it searches the os field
        //for the current os.name
        $myos = Phing::getProperty("os.name");
        $this->log("Current OS is " . $myos, Project::MSG_VERBOSE);
        if (($this->os !== null) && (strpos($this->os, $myos) === false)) {
            // this command will be executed only on the specified OS
            $this->log(
                "This OS, " . $myos
                . " was not found in the specified list of valid OSes: " . $this->os,
                Project::MSG_VERBOSE
            );
            return false;
        }
        return true;
    }
protected function isValidOs ( ) : bool { //hand osfamily off to OsCondition class, if set if ( $ this -> osFamily !== null && ! OsCondition :: isFamily ( $ this -> osFamily ) ) { return false ; } //the Exec OS check is different from Os.isOs(), which //probes for a specific OS. Instead it searches the os field //for the current os.name $ myos = Phing :: getProperty ( "os.name" ) ; $ this -> log ( "Current OS is " . $ myos , Project :: MSG_VERBOSE ) ; if ( ( $ this -> os !== null ) && ( strpos ( $ this -> os , $ myos ) === false ) ) { // this command will be executed only on the specified OS $ this -> log ( "This OS, " . $ myos . " was not found in the specified list of valid OSes: " . $ this -> os , Project :: MSG_VERBOSE ) ; return false ; } return true ; }
Is this the OS the user wanted?

@return boolean.
<ul>
<li>
<li><code>true</code> if the os and osfamily attributes are null.</li>
<li><code>true</code> if osfamily is set, and the os family and must match
that of the current OS, according to the logic of
{@link Os#isOs(String, String, String, String)}, and the result of the
<code>os</code> attribute must also evaluate true.
</li>
<li>
<code>true</code> if os is set, and the system.property os.name
is found in the os attribute,</li>
<li><code>false</code> otherwise.</li>
</ul>
Is this the OS the user wanted?