Skip to content

Commit b868b5f

Browse files
committed
add more checks to prevent silly errors
1 parent 8430bc1 commit b868b5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/prepublish.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ function check(map) {
7171

7272
// make sure the remote and current are on the same commit
7373
var currentBranch = (p.execSync(`git branch --show-current`) + "").trim()
74-
var remoteDiffs = p.execSync(`git diff ${currentBranch} origin/${currentBranch}`) + ""
74+
var command = `git diff ${currentBranch} origin/${currentBranch}`
75+
console.log(`Running '${command}'`)
76+
var remoteDiffs = p.execSync(command) + ""
7577
if(remoteDiffs){
7678
console.warn(`diffs with remote`)
7779
console.log(remoteDiffs)
80+
} else {
81+
console.log(`remote diffs looking good`)
7882
}
7983
}
8084

0 commit comments

Comments
 (0)