mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
workaround: pkg does not exist on type Process
This commit is contained in:
@@ -53,8 +53,8 @@ const cliArguments = yargs(hideBin(process.argv))
|
|||||||
|
|
||||||
// change all relative paths
|
// change all relative paths
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const directory = process.pkg ? path.dirname(process.execPath) : __dirname;
|
const directory = process['pkg'] ? path.dirname(process.execPath) : __dirname;
|
||||||
console.log(process.pkg ? 'Running from binary' : 'Running from source');
|
console.log(process['pkg'] ? 'Running from binary' : 'Running from source');
|
||||||
process.chdir(directory);
|
process.chdir(directory);
|
||||||
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
@@ -837,7 +837,7 @@ function getVersion() {
|
|||||||
try {
|
try {
|
||||||
const pkgJson = require('./package.json');
|
const pkgJson = require('./package.json');
|
||||||
pkgVersion = pkgJson.version;
|
pkgVersion = pkgJson.version;
|
||||||
if (!process.pkg && commandExistsSync('git')) {
|
if (!process['pkg'] && commandExistsSync('git')) {
|
||||||
gitRevision = require('child_process')
|
gitRevision = require('child_process')
|
||||||
.execSync('git rev-parse --short HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
.execSync('git rev-parse --short HEAD', { cwd: process.cwd(), stdio: ['ignore', 'pipe', 'ignore'] })
|
||||||
.toString().trim();
|
.toString().trim();
|
||||||
|
Reference in New Issue
Block a user