mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix cwd
This commit is contained in:
@@ -20,8 +20,6 @@ const cliArguments = yargs(hideBin(process.argv))
|
|||||||
}).argv;
|
}).argv;
|
||||||
|
|
||||||
// change all relative paths
|
// change all relative paths
|
||||||
// process.chdir(__dirname)
|
|
||||||
//console.log('cwd is: ',process.cwd()) //correct external project path
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
process.chdir(path.dirname(process.execPath));
|
process.chdir(path.dirname(process.execPath));
|
||||||
|
|
||||||
@@ -322,7 +320,7 @@ app.get('/version', function (_, response) {
|
|||||||
.toString().trim();
|
.toString().trim();
|
||||||
|
|
||||||
gitBranch = require('child_process')
|
gitBranch = require('child_process')
|
||||||
.execSync('git rev-parse --abbrev-ref HEAD', { cwd: __dirname })
|
.execSync('git rev-parse --abbrev-ref HEAD', { cwd: process.cwd() })
|
||||||
.toString().trim();
|
.toString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user