Skip to content

Commit ef0156e

Browse files
committed
Merge branch 'develop'
2 parents e828d43 + d94b1bd commit ef0156e

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

dist/mage-db-sync.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mage-db-sync.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mage-db-sync.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import commandLoader from './commands/index'
33
import fs from 'fs';
44
// @ts-ignore
55
import {getInstalledPath} from 'get-installed-path'
6-
import {error} from "./utils/console";
6+
import {consoleCommand, error} from "./utils/console";
77
import VersionCheck from "./utils/versionCheck";
88

99
getInstalledPath('mage-db-sync').then(async (path: any) => {
@@ -42,6 +42,17 @@ getInstalledPath('mage-db-sync').then(async (path: any) => {
4242
description = `${description}\nRun 'mage-db-sync self-update' to download the newest version: ${versionCheck.config.latestVersion}`;
4343
}
4444

45+
// Remove old files... Kinda dirty but it works
46+
new Promise(async (resolve, reject) => {
47+
if (fs.existsSync(`${npmPath}/dist/controllers/importController.js`)) {
48+
fs.unlinkSync(`${npmPath}/dist/controllers/importController.js`)
49+
}
50+
51+
if (fs.existsSync(`${npmPath}/dist/controllers/importController.js.map`)) {
52+
fs.unlinkSync(`${npmPath}/dist/controllers/importController.js.map`)
53+
}
54+
});
55+
4556
program
4657
.version(packageJson.version)
4758
.usage('<command> [options]')

0 commit comments

Comments
 (0)