This commit is contained in:
Benjamin Toby 2025-02-04 13:48:47 +01:00
parent efcee1bb11
commit accf486151
3 changed files with 7 additions and 7 deletions

4
dist/index.js vendored
View File

@ -12,11 +12,11 @@ global.SYNCING = false;
const confFileProvidedPath = process.argv[process.argv.length - 1]; const confFileProvidedPath = process.argv[process.argv.length - 1];
if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") { if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") {
try { 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}`); console.log(`Turbo Sync Version: ${JSON.parse(packageJson).version}`);
} }
catch (error) { 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); process.exit(6);
} }

View File

@ -17,13 +17,13 @@ const confFileProvidedPath = process.argv[process.argv.length - 1];
if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") { if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") {
try { try {
const packageJson = fs.readFileSync( const packageJson = fs.readFileSync(
path.resolve(__dirname, "package.json"), path.resolve(__dirname, "../package.json"),
"utf8" "utf-8"
); );
console.log(`Turbo Sync Version: ${JSON.parse(packageJson).version}`); console.log(`Turbo Sync Version: ${JSON.parse(packageJson).version}`);
} catch (error) { } catch (error: any) {
console.log( 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`
); );
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/turbosync", "name": "@moduletrace/turbosync",
"version": "1.0.4", "version": "1.0.5",
"module": "dist/index.js", "module": "dist/index.js",
"scripts": { "scripts": {
"start": "node dist/index.js", "start": "node dist/index.js",