3.5.0 • Published 5 years ago

@megasaur/check-working-tree v3.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@lerna/check-working-tree

Check git working tree status and error appropriately

Usage

const checkWorkingTree = require('@lerna/check-working-tree');

// values listed here are their defaults
const options = {
  cwd: process.cwd(),
};

(async () => {
  try {
    await checkWorkingTree(options);
  } catch (err) {
    console.error(err.message);
    // "Working tree has uncommitted changes, ..."
  }
})();