Updates
This commit is contained in:
parent
efcee1bb11
commit
accf486151
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -12,11 +12,11 @@ global.SYNCING = false;
|
||||
const confFileProvidedPath = process.argv[process.argv.length - 1];
|
||||
if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") {
|
||||
try {
|
||||
const packageJson = fs_1.default.readFileSync(path_1.default.resolve(__dirname, "package.json"), "utf8");
|
||||
const packageJson = fs_1.default.readFileSync(path_1.default.resolve(__dirname, "../package.json"), "utf-8");
|
||||
console.log(`Turbo Sync Version: ${JSON.parse(packageJson).version}`);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Turbo Sync Version fetch failed! \nNo Worries, Turbo Sync is still installed properly");
|
||||
console.log(`Turbo Sync Version fetch failed! ${error.message} \nNo Worries, Turbo Sync is still installed properly`);
|
||||
}
|
||||
process.exit(6);
|
||||
}
|
||||
|
8
index.ts
8
index.ts
@ -17,13 +17,13 @@ const confFileProvidedPath = process.argv[process.argv.length - 1];
|
||||
if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") {
|
||||
try {
|
||||
const packageJson = fs.readFileSync(
|
||||
path.resolve(__dirname, "package.json"),
|
||||
"utf8"
|
||||
path.resolve(__dirname, "../package.json"),
|
||||
"utf-8"
|
||||
);
|
||||
console.log(`Turbo Sync Version: ${JSON.parse(packageJson).version}`);
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.log(
|
||||
"Turbo Sync Version fetch failed! \nNo Worries, Turbo Sync is still installed properly"
|
||||
`Turbo Sync Version fetch failed! ${error.message} \nNo Worries, Turbo Sync is still installed properly`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/turbosync",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"module": "dist/index.js",
|
||||
"scripts": {
|
||||
"start": "node dist/index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user