Skip to content

Commit aed0c7b

Browse files
committed
refactor: execute commands using cwd file paths
1 parent 78698b9 commit aed0c7b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/App.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@ function App() {
166166
// prepare the walletshield binary for execution
167167
////////////////////////////////////////////////////////////////////////
168168
if (platform() === "linux" || platform() === "macos") {
169-
const output = await Command.create("chmod+x", [
170-
"+x",
171-
fileWalletshield,
172-
]).execute();
169+
log.debug(`executing command: chmod +x walletshield`);
170+
const output = await Command.create(
171+
"chmod-walletshield",
172+
["+x", "walletshield"],
173+
{
174+
cwd: dirNetwork,
175+
},
176+
).execute();
173177
if (output.code !== 0) {
174178
throw new Error(`Failed to chmod+x walletshield: ${output.stderr}`);
175179
}
@@ -181,7 +185,7 @@ function App() {
181185
setMsgType(() => "info");
182186
setMsg(() => `Starting network client...`);
183187
const cmd = "walletshield";
184-
const args = ["-listen", ":7070", "-config", fileClientCfg];
188+
const args = ["-listen", ":7070", "-config", "client.toml"];
185189
const command = Command.create("walletshield-listen", args, {
186190
cwd: dirNetwork,
187191
env: {

0 commit comments

Comments
 (0)