@lerna/check-working-tree

Check git working tree status and error appropriately

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@lerna/check-working-tree
33,6424335.6.14 days ago4 years agoMinified + gzip package size for @lerna/check-working-tree in KB

Readme

@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, ..."
  }
})();

Install lerna for access to the lerna CLI.