mirror of
https://github.com/status-im/re-natal.git
synced 2025-02-18 15:37:48 +00:00
make sure device exists on launch, change to default otherwise
This commit is contained in:
parent
0a2cea3719
commit
04bfb40ee4
@ -348,6 +348,10 @@ init = (projName, interfaceName) ->
|
|||||||
|
|
||||||
|
|
||||||
launch = ({name, device}) ->
|
launch = ({name, device}) ->
|
||||||
|
unless device in getDeviceUuids()
|
||||||
|
log 'Device ID not available, defaulting to iPhone 6s simulator', 'yellow'
|
||||||
|
{device} = generateConfig name
|
||||||
|
|
||||||
log 'Compiling ClojureScript'
|
log 'Compiling ClojureScript'
|
||||||
exec 'lein cljsbuild once dev'
|
exec 'lein cljsbuild once dev'
|
||||||
|
|
||||||
@ -394,6 +398,10 @@ getDeviceList = ->
|
|||||||
logErr 'Device listing failed: ' + message
|
logErr 'Device listing failed: ' + message
|
||||||
|
|
||||||
|
|
||||||
|
getDeviceUuids = ->
|
||||||
|
getDeviceList().map (line) -> line.match(/\[(.+)\]/)[1]
|
||||||
|
|
||||||
|
|
||||||
startRepl = (name) ->
|
startRepl = (name) ->
|
||||||
log 'Starting REPL'
|
log 'Starting REPL'
|
||||||
hasRlwrap =
|
hasRlwrap =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user