Skip to content

Commit d5db85d

Browse files
committed
Set default playground for bucklescript if env var is not set
1 parent 2090e40 commit d5db85d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/repl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ function e(cmd) {
1919
console.log(`<<<<<<`)
2020
}
2121

22-
// process.env.BS_PLAYGROUND = `../../bucklescript-playground`
2322
if (process.env.BS_PLAYGROUND == null) {
24-
console.error('please set env var BS_PLAYGROUND')
25-
process.exit(2)
23+
var defaultPlayground = `../../bucklescript-playground`
24+
console.warn(`BS_PLAYGROUND env var unset, defaulting to ${defaultPlayground}`)
25+
process.env.BS_PLAYGROUND = defaultPlayground
2626
}
2727

2828
var playground = process.env.BS_PLAYGROUND

0 commit comments

Comments
 (0)