Skip to content

Instantly share code, notes, and snippets.

@cheshirecode
Last active October 17, 2016 05:39
Show Gist options
  • Save cheshirecode/dacf4522bf2a14cf778c4451b8e8a586 to your computer and use it in GitHub Desktop.
Save cheshirecode/dacf4522bf2a14cf778c4451b8e8a586 to your computer and use it in GitHub Desktop.
(DO NOT modify) Fix babylon version to 6.11.2 in yarn.lock file for Yarn
#! /bin/bash
IFS='%'
if [ -f yarn.lock ]
then
n=`grep -n 'babylon@^6.0.18' yarn.lock | cut -d: -f 1`
while read line;do
if((i==n));then
echo ' version "6.11.2"'
elif((i==n+1));then
echo ' resolved "https://registry.npmjs.org/babylon/-/babylon-6.11.2.tgz"'
else
echo "$line"
fi
((i++))
done < yarn.lock > yarn1.lock
mv yarn1.lock yarn.lock
fi
unset IFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment