Skip to content

Commit

Permalink
Merge pull request #14 from goostleek/bugfix/windows-support
Browse files Browse the repository at this point in the history
fix: Windows support
  • Loading branch information
streamich authored Mar 5, 2019
2 parents 19bd84a + bcc3525 commit b816aeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/util/getGitRootDir.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const {execSync} = require('child_process');

const getGitRootDir = () => {
const dir = execSync('git rev-parse --show-toplevel 2>/dev/null')
const devNull = os.platform() === 'win32' ? 'nul' : '/dev/null'
const dir = execSync('git rev-parse --show-toplevel 2> ' + devNull)
.toString()
.trim();

Expand Down
6 changes: 4 additions & 2 deletions lib/util/lerna.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ const getAllPackages = (state) => {
}
};

const getChangedFiles = () =>
execSync('git diff --cached --name-only 2>/dev/null')
const getChangedFiles = () => {
const devNull = os.platform() === 'win32' ? 'nul' : '/dev/null'
execSync('git diff --cached --name-only 2> ' + devNull)
.toString()
.trim()
.split('\n');
}

const getChangedPackages = () => {
const unique = {};
Expand Down

1 comment on commit b816aeb

@streamich
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build version: 1.8.1-master.49 🤞 master on Travis 🎉

Please sign in to comment.