JSON-Patch icon indicating copy to clipboard operation
JSON-Patch copied to clipboard

Build script doesn't work for OS X due to differences between `sed` in OS X and Linux.

Open jaylattice opened this issue 5 years ago • 3 comments

Title explains everything, StackOverflow elaborates: https://stackoverflow.com/questions/16745988/sed-command-with-i-option-in-place-editing-works-fine-on-ubuntu-but-not-mac

I'm not really interested in submitting a PR for this, since it's not a huge concern for me. I just thought anyone else who wanted to build your package locally on OS X would want to know about this. Thank you for this library.

jaylattice avatar Feb 14 '20 04:02 jaylattice

Thanks for the information. I will look into this.

Starcounter-Jack avatar Aug 11 '20 23:08 Starcounter-Jack

@Starcounter-Jack I have tested a change to tsc-to-mjs.sh which resolves the problem for me on macos.

!/bin/bash
cd module
mv core.js core.mjs && mv duplex.js duplex.mjs && mv helpers.js helpers.mjs

if [[ "$OSTYPE" == "darwin"* ]]; then
    sed -i '' 's/\.js/\.mjs/g' duplex.mjs core.mjs
else
    sed -i 's/\.js/\.mjs/g' duplex.mjs core.mjs
fi

I will submit a PR with the above changes if that's helpful.

libreninja avatar Nov 25 '20 18:11 libreninja

@libreninja looks like I beat you to it https://github.com/Starcounter-Jack/JSON-Patch/pull/264

I honestly wasn't aware of this thread when I opened the pr

orengriffin avatar Dec 02 '20 09:12 orengriffin