Skip to content

Commit

Permalink
Fix version check and cleanup (#75)
Browse files Browse the repository at this point in the history
* Fix version check and cleanup

* Bump nodejs
  • Loading branch information
soulgalore authored Jun 29, 2022
1 parent cf81553 commit 5235b2d
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 170 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"root": true,
"env": {
"node": true,
"es6": true
"node": true
},
"parserOptions": {
"ecmaVersion": 8,
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["prettier"],
Expand Down
5 changes: 4 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import { readFileSync } from 'fs';
import minimist from 'minimist';
import { stop, start } from '../lib/index.js';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const version = require('../package.json').version;

const profiles = {
'3g': {
Expand Down Expand Up @@ -105,7 +108,7 @@ async function run(argv) {
});
console.log(' --log Log all network commands to the console');
} else if (argv.version) {
console.log(`Unknown`);
console.log(`${version}`);
} else {
if (argv.stop || argv._[0] === 'stop') {
const options = {
Expand Down
Loading

0 comments on commit 5235b2d

Please sign in to comment.