Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dont error on systems that cant pass flags to env in shebang (#38)
Using flags in a shebang fails on some systems see #37 Remove the flag from the shebang. Go back to shimming process.emit, but this time it works. **shimmed flavour** ```bash ~/Code/web3-storage/w3cli on main • ❯ ./shim.js up ~/Pictures/behemoth-black-hole-found-in-an-unlikely-place_26209716511_o\~orig.jpeg 1 file (8.4MB) bagbaieravvyvhoig75tgrvel6cxoqchnsftz4lltduxjckqugmaidmyua2rq ⁂ Stored 1 file ⁂ https://w3s.link/ipfs/bafybeidpouz7j6to2p7ps4j262ii32ov5wnp3rj4slavvsm4dfvonvrc6q ``` Sounds like ESM module load order was the problem last time in #9 > Since imports in ESM run [async](https://stackoverflow.com/questions/35551366/what-is-the-defined-execution-order-of-es6-imports), we have to make sure that the import runs before all other imports. This is needed when you cannot pass suppress-experimental-warnings via a a CLI argument. Note that at the time of writing this documentation, the import order seems to be non-deterministic (also for sync import). – https://github.com/dword-design/suppress-experimental-warnings#via-esm see: nodejs/node#30810 fixes: #37 License: MIT Signed-off-by: Oli Evans <oli@protocol.ai> Signed-off-by: Oli Evans <oli@protocol.ai>
- Loading branch information