cardanocli-js
cardanocli-js copied to clipboard
os independent file paths
The scripts currently don't work under windows.
Commands like typeof window !== "undefined" || execSync(`mkdir -p ${this.dir}/tmp`);
fail. It would be a nice feature if all platforms would be supported.
Currently it works under WSL but making a debugger work is still more complicated than it could.
Could you please share the errors you get?
I was able to reproduce the issue on a MacOS. It looks like the window
object is defined for some reason, getting the following error on the tests:
FAIL test/index.test.js
● Test suite failed to run
TypeError: execSync is not a function
125 | options.shelleyGenesisPath &&
126 | (this.shelleyGenesis = JSON.parse(
> 127 | execSync(`cat ${options.shelleyGenesisPath}`).toString()
| ^
128 | ));
129 |
130 | options.socketPath &&
at new CardanocliJs (index.js:127:11)
at Object.<anonymous> (test/index.test.js:14:19)
Could you confirm that is the same as in Windows?