Skip to content

Commit

Permalink
Merge pull request #210 from cosmos/fabo/204-fix-initial-crash
Browse files Browse the repository at this point in the history
Fabo/204 fix initial crash
  • Loading branch information
jbibla authored Dec 8, 2017
2 parents 62cd8bf + e1459fd commit aaf13ce
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const WIN = /^win/.test(process.platform)
const DEV = process.env.NODE_ENV === 'development'
const TEST = JSON.parse(process.env.COSMOS_TEST || 'false') !== false
// TODO default logging or default disable logging?
const LOGGING = JSON.parse(process.env.LOGGING || DEV) !== false
const LOGGING = JSON.parse(process.env.LOGGING || 'true') !== false
const MOCK = JSON.parse(process.env.MOCK || !TEST && DEV) !== false
const winURL = DEV
? `http://localhost:${require('../../../config').port}`
Expand Down Expand Up @@ -252,10 +252,14 @@ async function initBaseserver (chainId, home, node) {
// '--trust-node'
])
child.stdout.on('data', (data) => {
if (shuttingDown) return
// answer 'y' to the prompt about trust seed. we can trust this is correct
// since the baseserver is talking to our own full node
child.stdin.write('y\n')
let hashMatch = /\w{40}/g.exec(data)
if (hashMatch) {
log('approving hash', hashMatch[0])
if (shuttingDown) return
// answer 'y' to the prompt about trust seed. we can trust this is correct
// since the baseserver is talking to our own full node
child.stdin.write('y\n')
}
})
await expectCleanExit(child, 'gaia init exited unplanned')
}
Expand Down

0 comments on commit aaf13ce

Please sign in to comment.