Skip to content

Commit

Permalink
chore: support tendermint install in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Jul 25, 2024
1 parent 01c073d commit 8eaa5bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion electron/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const isProd = !isDev;
// Paths
const dotOperateDirectory = isProd
? path.join(os.homedir(), '.operate')
: '.operate';
: path.join(process.cwd(), '.operate');

const paths = {
dotOperateDirectory,
Expand Down
2 changes: 1 addition & 1 deletion electron/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function installTendermintUnix() {

const url = TendermintUrls[os.platform()][process.arch];

logger.electron(`Downloading ${url}, might take a while...`);
logger.electron(`Downloading ${url} to ${paths.tempDir}. This might take a while...`);
await downloadFile(url, `${paths.tempDir}/tendermint.tar.gz`);

logger.electron(`Installing tendermint binary`);
Expand Down
15 changes: 7 additions & 8 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,13 @@ ipcMain.on('check', async function (event, _argument) {
// Setup
try {
event.sender.send('response', 'Checking installation');
if (!isDev) {
if (platform === 'darwin') {
await setupDarwin(event.sender);
} else if (platform === 'win32') {
// TODO
} else {
await setupUbuntu(event.sender);
}

if (platform === 'darwin') {
await setupDarwin(event.sender);
} else if (platform === 'win32') {
// TODO
} else {
await setupUbuntu(event.sender);
}

if (isDev) {
Expand Down

0 comments on commit 8eaa5bb

Please sign in to comment.