Commit 5a2e9e54 authored by nanahira's avatar nanahira

maotama on linux is problematic

parent 6c7ac56b
...@@ -878,7 +878,7 @@ export class AppsService { ...@@ -878,7 +878,7 @@ export class AppsService {
async network(app: App, server: any) { async network(app: App, server: any) {
if (!this.maotama) { if (!this.maotama) {
this.maotama = new Promise((resolve, reject) => { this.maotama = new Promise((resolve, reject) => {
let child = sudo.fork('maotama', [], {stdio: ['inherit', 'inherit', 'inherit', 'ipc']}); let child = (process.platform === 'linux' ? child_process : sudo).fork('maotama', [], {stdio: ['inherit', 'inherit', 'inherit', 'ipc']}); // it's very shit of Linux electron-sudo
child.once('message', () => resolve(child)); child.once('message', () => resolve(child));
child.once('error', reject); child.once('error', reject);
child.once('exit', reject); child.once('exit', reject);
......
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment