Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: 🐛 use process.platform to check for platform
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 5, 2019
1 parent b816aeb commit be13775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/util/getGitRootDir.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const {execSync} = require('child_process');

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

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

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

0 comments on commit be13775

Please sign in to comment.