Change relative path handling

This commit is contained in:
SillyLossy
2023-05-16 20:35:46 +03:00
parent 65abdacefd
commit bf6df2b0e8

View File

@ -21,7 +21,9 @@ const cliArguments = yargs(hideBin(process.argv))
// change all relative paths
const path = require('path');
process.chdir(path.dirname(process.execPath));
const directory = process.pkg ? path.dirname(process.execPath) : __dirname;
console.log(process.pkg ? 'Running from binary' : 'Running from source');
process.chdir(directory);
const express = require('express');
const compression = require('compression');