Closed apaleslimghost closed 5 years ago
Currently Nori is still erroring when the branch already exists (e.g. when you've had a different error so started again).
git -C /Users/jennifer.shepherd/.config/transformation-runner-workspace/next-ads-api branch bugs/remove-main-field
Error message from git:
fatal: A branch named 'bugs/remove-main-field' already exists.
at Object.exports.handler (/Users/jennifer.shepherd/.nvm/versions/node/v8.15.0/lib/node_modules/nori/src/commands/run-script.js:100:18)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
Error: GitCommandError: Error running git command:
git -C /Users/jennifer.shepherd/.config/transformation-runner-workspace/next-ads-api branch bugs/remove-main-field
Error message from git:
fatal: A branch named 'bugs/remove-main-field' already exists.
at handleDugiteExecResult (/Users/jennifer.shepherd/.nvm/versions/node/v8.15.0/lib/node_modules/nori/node_modules/@financial-times/git/src/helpers/handle-dugite-exec-result.js:29:11)
at Object.createBranch (/Users/jennifer.shepherd/.nvm/versions/node/v8.15.0/lib/node_modules/nori/node_modules/@financial-times/git/src/index.js:75:12)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)```
currently
run-script
errors if the branch already exists, and if the clone already exists it only checks out master before creating the new branch. it should hard reset, pull from origin, & delete existing branches. goes hand in hand with #56 and #48