Return whether the dev configuration directory should used.
3854
def use_dev_config_dir(use_dev_config_dir=USE_DEV_CONFIG_DIR):
    """"""
    if use_dev_config_dir is not None:
        if use_dev_config_dir.lower() in {'false', '0'}:
            use_dev_config_dir = False
    else:
        use_dev_config_dir = DEV or not is_stable_version(__version__)
    return use_dev_config_dir
1212092
protected function validateConfiguration()
    {
        if (!$this->environment->load(getcwd() . DIRECTORY_SEPARATOR . 'peridot.php')) {
            fwrite(STDERR, "Configuration file specified but does not exist" . PHP_EOL);
            exit(1);
        }
    }
982063
def config_default(dest):
    
    conf_path = Path(dest).resolve()
    if conf_path.is_dir():
        conf_path = conf_path / LIGHTFLOW_CONFIG_NAME

    conf_path.write_text(Config.default())
    click.echo('Configuration written to {}'.format(conf_path))
1226015
function findDirRec(dir, callback) {
      var result = path.resolve(dir, dirmod);
      fs.stat(result, function stat(err, stat) {
        if (err || !stat.isDirectory()) {
          if (lastResult == result) {
            callback(new Error('No configuration directory found.'));
            return;
          }
          lastResult = result;
          findDirRec(path.resolve(dir, '..'), callback);
        } else {
          callback(null, result);
        }
      });
    }
1259631
def precheck():
    
    cfg_path = local_config['PROJECT']['CONFIG_PATH']
    # enable or disable logging based on config/ defaults
    logging = set_logging(local_config)

    if os.path.exists(cfg_path):
        logger.info('%s: config_path parameter: %s' % (inspect.stack()[0][3], cfg_path))
        logger.info(
            '%s: Existing configuration file found. precheck pass.' %
            (inspect.stack()[0][3]))
        return True
    elif not os.path.exists(cfg_path) and logging is False:
        logger.info(
            '%s: No pre-existing configuration file found at %s. Using defaults. Logging disabled.' %
            (inspect.stack()[0][3], cfg_path)
            )
        return True
    if logging:
        logger.info(
            '%s: Logging enabled per config file (%s).' %
            (inspect.stack()[0][3], cfg_path)
            )
        return True
    return False
643380
function detectConfig(appDir) {
    var config = {};
    var meteoriteUsed = fs.existsSync(path.resolve(appDir, './smart.json'));
    if(meteoriteUsed) {
      config.meteorite = true;
      config.nodeBinary = helpers.getMeteoriteNode(appDir);
    } else {
      config.meteorite = false;
      config.nodeBinary = helpers.getMeteorNode();
    }

    return config;
  }
986681
protected function checkSettings()
    {
        $io = $this->event->getIO();

        if ($this->disabled) {
            $io->write('<info>[C33sConstructionKitBundle] C33sConstructionKit is disabled</info>');

            return false;
        }

        if (!is_dir($this->appDir)) {
            $currentDir = getcwd();
            $io->write("<warning>[C33sConstructionKitBundle] The symfony-app-dir {$this->appDir} specified in composer.json was not found in {$currentDir}. Cannot generate building blocks file.</warning>");

            return false;
        }

        return true;
    }
839648
def get_default_config_directory():
        
        test_path = os.path.dirname(os.path.realpath(inspect.getouterframes(inspect.currentframe())[2][1]))
        return os.path.join(test_path, 'conf')
390209
def check_config(config):
    '''
        
    '''
    # Check server URL
    url = config.get("Server", "url")
    try:
        urlopen(url)
    except Exception as e:
        logger.error(
            "The configured OpenSubmit server URL ({0}) seems to be invalid: {1}".format(url, e))
        return False
    # Check directory specification
    targetdir = config.get("Execution", "directory")
    if platform.system() is not "Windows" and not targetdir.startswith("/"):
        logger.error(
            "Please use absolute paths, starting with a /, in your Execution-directory setting.")
        return False
    if not targetdir.endswith(os.sep):
        logger.error(
            "Your Execution-directory setting must end with a " + os.sep)
        return False
    return True
173529
protected function doSetupDrush() {
    $content = file_get_contents(__DIR__ . '/../dist/drushrc.php');
    $content = str_replace('BUILD_ROOT', $this->getBuildRoot(), $content);
    $filename = $this->getDefaultDirectory() . '/drushrc.php';
    $this->write('Setup default Drush configuration file at <comment>%s</comment>', $this->shortenDirectory($filename));
    file_put_contents($filename, $content);
  }
1171552
function setup() {

    // check if config directory is given
    if( _config_path !== -1 ) {

      // get path
      var config_path = path.resolve( process.argv[ _config_path + 1 ] );

      // check if directory exists and is a valid directory
      fs.stat( config_path, function( err, stats ) {
        if( err && err.code === "ENOENT" ) {
          process.stdout.write( "The given directory doesn't exists.\n".red );
        } else if( err ) {

          // unknown error
          process.stdout.write( (err.message + "\n").red );
        } else if( !stats.isDirectory() ) {
          process.stdout.write( "The given config directory is not an actual directory.\n".red );
        } else {
          readConfigDir( config_path );
        }
      } );
      return;
    }

    // ask for config directory
    ask( "Where are your config files? ", function( c_path ) {
        readConfigDir( c_path );
    } );
}
764667
def init_current_directory():
    """"""
    settings_directory=project_path+'/.dry'
    settings_file=settings_directory+'/config.py'
    if os.path.isdir(settings_directory):
	# already initialized
	print("directory already initialized.")
	return
    # init
    os.makedirs(settings_directory)
    f = open(settings_file,'w')
    print(sample_config_file, file=f)
    f.close()
28758
def check_config(db, level):
    """"""
    if level == 'global':
        configuration = config.read(config.HOMEDIR, '.passpierc')
    elif level == 'local':
        configuration = config.read(os.path.join(db.path))
    elif level == 'current':
        configuration = db.config

    if configuration:
        click.echo(yaml.safe_dump(configuration, default_flow_style=False))
684043
public function shouldMoveToRoot()
    {
        $config = $this->getConfig();

        if (isset($config['move_to_root']) && $config['move_to_root'] === true) {
            return true;
        }

        return $this->getDocumentRoot() === 'public' && !is_dir($this->getRoot() . '/public');
    }
1325330
public boolean shouldConfigureVirtualenv() {
    if(this.configureVirtualenv == ConfigureVirtualenv.NO) {
      return false;
    } else if(this.configureVirtualenv == ConfigureVirtualenv.YES) {
      return true;
    } else {
      final Optional<File> whichVirtualenv = this.which("virtualenv");
      return whichVirtualenv.isPresent();
    }
  }
231648
def _mkdir_for_config(cfg_file=cfg_file):
    
    dirname, filename = os.path.split(cfg_file)
    try:
        os.makedirs(dirname)
    except OSError as exc:
        if exc.errno == errno.EEXIST and os.path.isdir(dirname):
            pass
        else:
            raise
694215
def site_config_dir(self):
        """"""
        directory = appdirs.site_config_dir(self.appname, self.appauthor,
                             version=self.version, multipath=self.multipath)
        if self.create:
            self._ensure_directory_exists(directory)
        return directory