Skip to content

Commit 87a03dc

Browse files
committed
Auto commit @auto-committer
4 files Modified: [index.js](+5)(-3), [lib/master.js](+1)(-0), [package.json](+1)(-1), [src/master.ts](+2)(-0)
1 parent f79063b commit 87a03dc

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
2-
"use strict";
3-
if (process.env.isWorker) require('./lib/worker');
4-
else require('./lib/master');
2+
'use strict';
3+
if (process.env.isWorker)
4+
Promise.resolve().then(() => require('./lib/worker'));
5+
else
6+
Promise.resolve().then(() => require('./lib/master'));
57
process.on('SIGINT', () => { });

lib/master.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const crypto = require("crypto");
1010
const dir = require("recurdir");
1111
const PATH = require("path");
1212
const fs = require("fs");
13+
__dirname = PATH.join(__dirname, '../');
1314
const cpc = new worker_communication_1.default(), prompt = new prompt_1.default(), logServer = new cluster_ipc_logger_1.loggerServer({
1415
debug: false,
1516
directory: PATH.join(__dirname, 'logs'),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "safe-backup",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "A CLI tool that helps you backup file or folder into a single password encrypted file. Using technology of Tar & AES.",
55
"main": "init.js",
66
"scripts": {

src/master.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import * as dir from 'recurdir';
99
import * as PATH from 'path';
1010
import * as fs from 'fs';
1111

12+
__dirname = PATH.join(__dirname, '../');
13+
1214
declare global {
1315
interface Config {
1416
input: string[];

0 commit comments

Comments
 (0)