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;
    }