added log module
This commit is contained in:
@@ -3,7 +3,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const run = require('../run/index');
|
||||
const Sdk = require('./sdk');
|
||||
const System = Sdk.System;
|
||||
const Env = require('./env');
|
||||
|
||||
|
||||
class NekoLink {
|
||||
@@ -56,26 +56,25 @@ class Neko extends Sdk {
|
||||
}
|
||||
|
||||
activate() {
|
||||
process.env.NEKO_INSTPATH = this.path;
|
||||
if (process.env.PATH.split(path.delimiter).indexOf(this.path) === -1) {
|
||||
process.env.PATH = [process.env.PATH, this.path].join(path.delimiter);
|
||||
}
|
||||
Env.set('NEKO_INSTPATH', this.path);
|
||||
Env.addPath(this.path);
|
||||
Env.addPath(this.path, 'LD_LIBRARY_PATH');
|
||||
}
|
||||
|
||||
get nekoBin() {
|
||||
let binname = 'neko';
|
||||
if (os.type() == 'Windows_NT') binname += '.exe';
|
||||
if (os.type() === 'Windows_NT') binname += '.exe';
|
||||
return path.join(this.path, binname);
|
||||
}
|
||||
|
||||
run(filename, params) {
|
||||
this.log.i('_run_ *%s*', filename);
|
||||
this.activate();
|
||||
console.log(`${this.nekoBin} ${filename}`);
|
||||
return run(`${this.nekoBin} ${filename}`, params).exec();
|
||||
}
|
||||
}
|
||||
|
||||
Neko.ID = 'neko'
|
||||
Neko.ID = 'neko';
|
||||
|
||||
Neko.VERSION_2_2_0 = '2.2.0';
|
||||
Neko.VERSION = Neko.VERSION_2_2_0;
|
||||
|
||||
Reference in New Issue
Block a user