'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var fs_fs = require('../fs/fs.js');
var nodejs_fs = require('../nodejs/fs.js');
require('../nodejs/crypto.js');
require('../nodejs/os.js');

function getSubmodulePathList() {
  var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '.gitmodules';
  if (!nodejs_fs.getFs().existsSync(file)) {
    return [];
  }
  var content = fs_fs.readFileSync(file);
  var pathReg = /(?<=path\s*=\s*)([^\s]+)/g;
  var match = content.match(pathReg) || [];
  return match || [];
}

exports.getSubmodulePathList = getSubmodulePathList;
