lerna / lerna/lerna

Exit code is 1 while lerna success version finished

Open
#2,970 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
36.1k
Forks
2.3k
Avg merge
1d 4h
Merged PRs (30d)
50

Description

Expected Behavior

Exit code should be 0

Current Behavior

❯ lerna version patch --yes --no-commit-hooks || echo $?
info cli using local version of lerna
lerna notice cli v4.0.0
lerna info current version 2.0.21
lerna info Looking for changed packages since v2.0.21

Changes:
 - xxx-ui: 2.0.21 => 2.0.22
 - xxx-ui-demo: 2.0.21 => 2.0.22 (private)

lerna info auto-confirmed
lerna info execute Skipping releases
lerna info git Pushing tags...
lerna WARN gitPush fatal: the receiving end does not support --atomic push
lerna WARN gitPush fatal: the remote end hung up unexpectedly
lerna WARN gitPush error: failed to push some refs to '<Azure DevOps repo URL redacted>'
lerna info gitPush --atomic failed, attempting non-atomic push
lerna success version finished
1

Possible Solution

Steps to Reproduce (for bugs)

  1. (Will update later)
lerna.json

<!-- Please paste your `lerna.json` here -->
{
  "packages": [
    "xxx-ui",
    "xxx-ui-demo",
    "xxx-ui-docs"
  ],
  "npmClient": "yarn",
  "version": "2.0.22"
}


lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->

Context

Your Environment

Executable Version
lerna --version 4.0.0
npm --version 6.14.14
yarn --version 1.22.11
node --version v14.17.4
OS Version
WSL2 & Windows 10 5.10.16.3-microsoft-standard-WSL2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lerna version patch --yes --no-commit-hooks command and its gitPush --atomic and non-atomic push messages; reproduce the exit status in the provided Lerna, Node.js, npm, Yarn, and WSL2 environment. Done means the command's exit status matches the successful version result, with the push-failure behavior understood and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, node.js, typescript
Domain
cli, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.