Skip to content

Commit 2bbf573

Browse files
committed
[LW-9778, DDW-1228] Add -N to the RTS opts of both node and wallet
1 parent bc88c8b commit 2bbf573

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nix/internal/common.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ rec {
234234
# FIXME: this has to be done better…
235235
temporaryNodeModulesPatches = ''
236236
sed -r "s/'127\.0\.0\.1'/undefined/g" -i node_modules/cardano-launcher/dist/src/cardanoNode.js
237+
238+
# Has to be idempotent:
239+
if ! grep -qF "'-N'" node_modules/cardano-launcher/dist/src/cardanoWallet.js ; then
240+
sed -r "s/'serve'/\0, '+RTS', '-N', '-RTS'/g" -i node_modules/cardano-launcher/dist/src/cardanoWallet.js
241+
fi
242+
243+
# Has to be idempotent:
244+
if ! grep -qF "'-N'" node_modules/cardano-launcher/dist/src/cardanoNode.js ; then
245+
sed -r "s/config.rtsOpts/(\0 || []).concat(['-N'])/g" -i node_modules/cardano-launcher/dist/src/cardanoNode.js
246+
fi
237247
'';
238248

239249
electronVersion = originalPackageJson.dependencies.electron;

0 commit comments

Comments
 (0)