mirror of https://github.com/Kylart/KawAnime.git
Removed detached option
This commit is contained in:
parent
a5b5f9bdf7
commit
5d015fc668
|
@ -15,11 +15,6 @@ function start (name, sub, opts) {
|
|||
const electronProcess = require(join(__dirname, 'electron', 'runner.js'))(opts)
|
||||
console.log(`> App started with pid ${electronProcess.pid}.`)
|
||||
} else {
|
||||
if (opts.detached) {
|
||||
console.log('\tCannot start detached server. You might never be able to close it.')
|
||||
console.log('\tIf you really wish to do so, please contact me on Discord or by mail: kylart.dev@gmail.com\n\n')
|
||||
}
|
||||
|
||||
require(__dirname)
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +23,6 @@ function init () {
|
|||
args
|
||||
.option('port', 'The port on which the app will be running', port)
|
||||
.option('server', 'If set to true, KawAnime will start in server-only mode', false)
|
||||
.option('detached', 'If set to true, the control of your console will be given back to you', false)
|
||||
.option('verbose', 'Whether or not you want to see logs', false)
|
||||
.command('start', 'Start the app', start)
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ const electron = require('electron')
|
|||
const { join } = require('path')
|
||||
const { spawn } = require('child_process')
|
||||
|
||||
function init ({detached, verbose}) {
|
||||
const electronProcess = spawn(electron, [join(__dirname, '..', 'index.js')], { detached })
|
||||
function init ({verbose}) {
|
||||
const electronProcess = spawn(electron, [join(__dirname, '..', 'index.js')])
|
||||
|
||||
if (!detached && verbose) {
|
||||
if (verbose) {
|
||||
electronProcess.stdout.on('data', (data) => {
|
||||
process.stdout.write(data)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue