Browse Source

Only allow process.exit in certain places

master
Leo Lamprecht 8 years ago
parent
commit
df111b9eba
No known key found for this signature in database GPG Key ID: B08517883D5E0E10
  1. 6
      lib/utils/check-path.js
  2. 1
      package.json

6
lib/utils/check-path.js

@ -2,9 +2,6 @@
const os = require('os') const os = require('os')
const path = require('path') const path = require('path')
// Ours
const {error} = require('../error')
const checkPath = async dir => { const checkPath = async dir => {
if (!dir) { if (!dir) {
return return
@ -46,8 +43,7 @@ const checkPath = async dir => {
locationName = location locationName = location
} }
error(`You're trying to deploy your ${locationName}.`) throw new Error(`You're trying to deploy your ${locationName}.`)
process.exit(1)
} }
module.exports = checkPath module.exports = checkPath

1
package.json

@ -47,7 +47,6 @@
"max-depth": 0, "max-depth": 0,
"no-use-before-define": 0, "no-use-before-define": 0,
"complexity": 0, "complexity": 0,
"unicorn/no-process-exit": 0,
"no-control-regex": 0 "no-control-regex": 0
} }
}, },

Loading…
Cancel
Save