mirror of
https://github.com/status-im/re-natal.git
synced 2025-02-04 16:53:25 +00:00
simplified err handling block
This commit is contained in:
parent
15e2301324
commit
0a5fecca0e
18
main.coffee
18
main.coffee
@ -156,16 +156,14 @@ init = (projName) ->
|
||||
log '✔ Done', 'bgMagenta'
|
||||
log ''
|
||||
|
||||
|
||||
catch e
|
||||
if e.message.match /type\:.+lein/i
|
||||
logErr 'Leiningen is required (http://leiningen.org/)'
|
||||
|
||||
else if e.message.match /type\:.+pod/i
|
||||
logErr 'CocoaPods is required (https://cocoapods.org/)'
|
||||
|
||||
else
|
||||
logErr e.message
|
||||
catch {message}
|
||||
logErr \
|
||||
if message.match /type\:.+lein/i
|
||||
'Leiningen is required (http://leiningen.org/)'
|
||||
else if message.match /type\:.+pod/i
|
||||
'CocoaPods is required (https://cocoapods.org/)'
|
||||
else
|
||||
message
|
||||
|
||||
process.exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user