npm.io
3.5.1 • Published 7 years ago

@yoitsro/lerna-check-working-tree

Licence
MIT
Version
3.5.1
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
36.1K

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