Skip to content

Commit 67a629f

Browse files
authored
Merge pull request rescript-lang#3712 from BuckleScript/npm_link_once
[ci] only do npm link for once
2 parents 9bb0228 + 06657b9 commit 67a629f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

jscomp/build_tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

scripts/ciTest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,14 @@ function main() {
140140
if (bsbTest){
141141
console.log('Doing build_tests')
142142
var buildTestDir = path.join(__dirname,'..','jscomp','build_tests')
143+
cp.execSync(`npm link bs-platform`, {cwd : buildTestDir, stdio:[0,1,2],encoding : 'utf8'})
143144
var files = fs.readdirSync(buildTestDir)
144145
files.forEach(function(file){
145146
var testDir = path.join(buildTestDir, file)
146147
if(!fs.existsSync(path.join(testDir,'input.js'))){
147148
console.warn(`input.js does not exist in ${testDir}`)
148149
} else {
149-
cp.execSync(`npm link bs-platform`, {cwd : testDir, stdio:[0,1,2],encoding : 'utf8'})
150+
150151
// note existsSync test already ensure that it is a directory
151152
cp.exec(`node input.js`, {cwd : testDir, encoding : 'utf8'},function (error, stdout, stderr){
152153
console.log(stdout)

0 commit comments

Comments
 (0)