File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/git-parse/dist/git_pull.js.flow
import promisify from 'util.promisify';
import childProcess from 'child_process';
import {validatePath, resolveHome} from './util';
const exec = promisify(childProcess.exec);
/**
* Pulls a repo given its path.
*
* Returns void. Throws error on failure.
*/
const gitPull = async pathToRepo => {
const resolvedPath = resolveHome(pathToRepo);
try {
validatePath(resolvedPath);
} catch (e) {
return Promise.reject(e);
}
return exec(`git pull`, {cwd: resolvedPath});
};
export default gitPull;