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) {
|
||||
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) {
|
||||
return callback(new Error(error), null);
|
||||
}
|
||||
@ -37,7 +37,7 @@ function compression(pathToFolder, outputPath, callback) {
|
||||
});
|
||||
})
|
||||
} 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) {
|
||||
return callback(new Error(error), null);
|
||||
}
|
||||
|
@ -24,12 +24,17 @@ const crypto = new Crypto();
|
||||
require('electron-dl')();
|
||||
|
||||
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
|
||||
process.env.PATH = shellPath.sync() || [
|
||||
shellPath()
|
||||
.then((path) => {
|
||||
process.env.PATH = path
|
||||
})
|
||||
.catch(() => {
|
||||
process.env.PATH = [
|
||||
'./node_modules/.bin',
|
||||
'/.nodebrew/current/bin',
|
||||
'/usr/local/bin',
|
||||
process.env.PATH
|
||||
].join(':');
|
||||
});
|
||||
|
||||
// used to check if a url was opened when the app was already open
|
||||
let isAppAlreadyOpen = false;
|
||||
|
Loading…
Reference in New Issue
Block a user