Skip to content

Instantly share code, notes, and snippets.

@abernix
Created October 28, 2016 14:31
Show Gist options
  • Save abernix/83908d82d7fc6ccf81ed6bc5b2c23ab8 to your computer and use it in GitHub Desktop.
Save abernix/83908d82d7fc6ccf81ed6bc5b2c23ab8 to your computer and use it in GitHub Desktop.
Hot-Patch 1.4.2 --unsafe-perm issue
#!/bin/sh
hot_patch () {
echo "=> Hot-Patching Meteor 1.4.2 to not pass --unsafe-perm to springboarded version..."
echo "=> https://github.com/meteor/meteor/issues/7959"
echo "=> REMOVE THIS when Meteor 1.4.2.1 comes out!"
echo "$(dirname "$(readlink "$HOME/.meteor/meteor")")/tools/cli/main.js" | \
grep '/1\.4\.2/' | \
xargs perl -0pi.bak \
-e 's/(^\h+var newArgv.*?$)/$1\n\n newArgv = newArgv.filter(function (arg) { return arg !== "--unsafe-perm"; });/ms'
}
hot_patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment