Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/vreg/node_modules/git-config-path/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/vreg/node_modules/git-config-path/index.js
/*!
 * git-config-path <https://github.com/jonschlinkert/git-config-path>
 *
 * Copyright (c) 2015-present, Jon Schlinkert.
 * Licensed under the MIT License.
 */

'use strict';

const fs = require('fs');
const os = require('os');
const path = require('path');

module.exports = function(type, options) {
  if (typeof type !== 'string') {
    options = type;
    type = null;
  }

  let opts = Object.assign({ cwd: process.cwd(), type }, options);
  let configPath;

  if (opts.type === 'global') {
    configPath = path.join(os.homedir(), '.gitconfig');
  } else {
    configPath = path.resolve(opts.cwd, '.git/config');
  }

  if (!fs.existsSync(configPath)) {
    if (typeof opts.type === 'string') return null;
    configPath = path.join(os.homedir(), '.config/git/config');
  }

  return fs.existsSync(configPath) ? configPath : null;
};

Spamworldpro Mini