mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-20 11:48:30 -06:00
SEARCH-197
- Removed the verbose from the tar cmd - Made shellPath async
This commit is contained in:
parent
1bbb1f3ff0
commit
0c159d1d5c
@ -27,7 +27,7 @@ const lz4Path = isDevEnv ? devPath : productionPath;
|
|||||||
*/
|
*/
|
||||||
function compression(pathToFolder, outputPath, callback) {
|
function compression(pathToFolder, outputPath, callback) {
|
||||||
if (isMac) {
|
if (isMac) {
|
||||||
child.exec(`cd "${DATA_FOLDER_PATH}" && tar cvf - "${pathToFolder}" | lz4 > "${outputPath}.tar.lz4"`, (error, stdout, stderr) => {
|
child.exec(`cd "${DATA_FOLDER_PATH}" && tar cf - "${pathToFolder}" | lz4 > "${outputPath}.tar.lz4"`, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return callback(new Error(error), null);
|
return callback(new Error(error), null);
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ function compression(pathToFolder, outputPath, callback) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
child.exec(`cd "${DATA_FOLDER_PATH}" && "${libraryFolderPath}\\tar-win.exe" cvf - "${pathToFolder}" | "${lz4Path}" > "${outputPath}.tar.lz4"`, (error, stdout, stderr) => {
|
child.exec(`cd "${DATA_FOLDER_PATH}" && "${libraryFolderPath}\\tar-win.exe" cf - "${pathToFolder}" | "${lz4Path}" > "${outputPath}.tar.lz4"`, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return callback(new Error(error), null);
|
return callback(new Error(error), null);
|
||||||
}
|
}
|
||||||
|
17
js/main.js
17
js/main.js
@ -24,12 +24,17 @@ const crypto = new Crypto();
|
|||||||
require('electron-dl')();
|
require('electron-dl')();
|
||||||
|
|
||||||
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
||||||
process.env.PATH = shellPath.sync() || [
|
shellPath()
|
||||||
'./node_modules/.bin',
|
.then((path) => {
|
||||||
'/.nodebrew/current/bin',
|
process.env.PATH = path
|
||||||
'/usr/local/bin',
|
})
|
||||||
process.env.PATH
|
.catch(() => {
|
||||||
].join(':');
|
process.env.PATH = [
|
||||||
|
'./node_modules/.bin',
|
||||||
|
'/usr/local/bin',
|
||||||
|
process.env.PATH
|
||||||
|
].join(':');
|
||||||
|
});
|
||||||
|
|
||||||
// used to check if a url was opened when the app was already open
|
// used to check if a url was opened when the app was already open
|
||||||
let isAppAlreadyOpen = false;
|
let isAppAlreadyOpen = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user