mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
runners cwd simplified
This commit is contained in:
parent
7b67576131
commit
98ff6db701
@ -96,10 +96,10 @@ module.exports = {
|
||||
console.log(`RUNNING SCRIPT ${scriptFile}`);
|
||||
// const subprocess = fork(scriptFile, ['--checkParent', '--max-old-space-size=8192'], {
|
||||
const subprocess = fork(scriptFile, ['--checkParent', ...process.argv.slice(3)], {
|
||||
cwd: directory,
|
||||
stdio: ['ignore', 'pipe', 'pipe', 'ipc'],
|
||||
env: {
|
||||
DBGATE_API: global['dbgateApiModulePath'] || process.argv[1],
|
||||
DBGATE_CWD: directory,
|
||||
..._.fromPairs(pluginNames.map(name => [`PLUGIN_${_.camelCase(name)}`, path.join(pluginsdir(), name)])),
|
||||
},
|
||||
});
|
||||
|
@ -4,10 +4,6 @@ async function initializeApiEnvironment() {
|
||||
process.on('message', async message => {
|
||||
handleProcessCommunication(message);
|
||||
});
|
||||
|
||||
if (process.env.DBGATE_CWD) {
|
||||
process.chdir(process.env.DBGATE_CWD);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = initializeApiEnvironment;
|
||||
|
@ -14,7 +14,7 @@ const platformInfo = {
|
||||
isMac,
|
||||
isLinux,
|
||||
isDocker,
|
||||
isSnap: p.env.ELECTRON_SNAP,
|
||||
isSnap: p.env.ELECTRON_SNAP == 'true',
|
||||
isPortable: isWindows && p.env.PORTABLE_EXECUTABLE_DIR,
|
||||
isAppImage: p.env.DESKTOPINTEGRATION === 'AppImageLauncher',
|
||||
sshAuthSock: p.env.SSH_AUTH_SOCK,
|
||||
|
Loading…
Reference in New Issue
Block a user