Skip to content

Commit 329af98

Browse files
authored
Merge pull request #17 from tattersoftware/vendor
Restore vendor state
2 parents f7b2bc1 + 63f4d20 commit 329af98

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/patch

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ echo "Base Branch: $BASE"
126126
echo "Selected Items: $ITEMS"
127127

128128
# From here on everything is destructive (but reversible) so we want hard stops
129-
set -ex
129+
set -e
130130

131131
# Create a blank branch to work on
132132
git switch --orphan tatter/scratch
@@ -176,7 +176,11 @@ rm composer.*
176176
# Create the new branch from base
177177
git switch -c tatter/patches "$BASE"
178178

179+
# Restore the original state of vendor/
180+
composer install > /dev/null
181+
179182
# Attempt the merge
183+
set +e
180184
git cherry-pick tatter/scratch
181185

182186
if [ $? -eq 0 ]; then
@@ -188,8 +192,10 @@ fi
188192
git status
189193

190194
# Conflict: explain and exit
195+
echo ""
191196
echo "Conflicts detected during patch! Follow the git instructions for resolution."
192197
echo "Once resolution is complete your changes will be available on branch tatter/patches"
193198
echo "and you should remove the old working branch at tatter/scratch."
199+
echo ""
194200

195201
exit 1

0 commit comments

Comments
 (0)