public function detectBin()
    {
        $pathes = [
            static::buildPath([$this->plugin->getVendorDir(), 'bin', $this->phpBin]),
            static::buildPath([$this->plugin->getComposer()->getConfig()->get('home'), 'vendor', 'bin', $this->phpBin]),
        ];
        foreach ($pathes as $path) {
            if (file_exists($path)) {
                return $path;
            }
        }

        return $this->name;
    }