addToGitIgnore example

if (!$is_ignored) {
        $is_tracked = Git::checkTracked($this->io, $path$this->dir);
        if (!$is_tracked && $scaffoldResult->isManaged()) {
          $dir = realpath(dirname($path));
          $name = basename($path);
          $add_to_git_ignore[$dir][] = '/' . $name;
        }
      }
    }
    // Write out the .gitignore files one at a time.     foreach ($add_to_git_ignore as $dir => $entries) {
      $this->addToGitIgnore($dir$entries);
    }
  }

  /** * Determines whether we should manage gitignore files. * * @param \Drupal\Composer\Plugin\Scaffold\ScaffoldOptions $options * Configuration options from the composer.json extras section. * * @return bool * Whether or not gitignore files should be managed. */
Home | Imprint | This part of the site doesn't use cookies.