Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: lerna publish errors out with a git error on 3.14 only #2091

Closed
kirjai opened this issue May 15, 2019 · 4 comments
Closed

Bug: lerna publish errors out with a git error on 3.14 only #2091

kirjai opened this issue May 15, 2019 · 4 comments

Comments

@kirjai
Copy link

kirjai commented May 15, 2019

As a newcomer to lerna, i am currently in the process of setting up a project. I've gotten to the publish stage and tried running lerna publish but got a git error.

Downgrading to 3.13.4 solves that problem and detects the versions of packages to update / publish correctly.

Expected Behavior

Same as 3.13.4 (last published lerna version before 3.14)

Current Behavior

See the lerna-debug.log below

Possible Solution

As mentioned, downgrading to 3.13.4 solves the problem

Steps to Reproduce (for bugs)

Literally, all i'm doing is running lerna publish with no args and getting an error after a couple of seconds

lerna.json

<!-- Please paste your `lerna.json` here -->
{
  "packages": [
    "apps/*",
    "packages/*"
  ],
  "version": "independent",
  "command": {
    "concurrency": 1,
    "publish": {
      "conventionalCommits": true,
      "scope": "**omitted**/*",
      "ignoreChanges": [
        "*.md"
      ]
    }
  },
  "npmClient": "yarn",
  "npmClientArgs": [
    "--no-lockfile"
  ],
  "useWorkspaces": true
}

lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
27 error Error: Command failed: git
27 error
27 error usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
27 error            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
27 error            [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
27 error            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
27 error            <command> [<args>]
27 error
27 error These are common Git commands used in various situations:
27 error
27 error start a working area (see also: git help tutorial)
27 error    clone      Clone a repository into a new directory
27 error    init       Create an empty Git repository or reinitialize an existing one
27 error
27 error work on the current change (see also: git help everyday)
27 error    add        Add file contents to the index
27 error    mv         Move or rename a file, a directory, or a symlink
27 error    reset      Reset current HEAD to the specified state
27 error    rm         Remove files from the working tree and from the index
27 error
27 error examine the history and state (see also: git help revisions)
27 error    bisect     Use binary search to find the commit that introduced a bug
27 error    grep       Print lines matching a pattern
27 error    log        Show commit logs
27 error    show       Show various types of objects
27 error    status     Show the working tree status
27 error
27 error grow, mark and tweak your common history
27 error    branch     List, create, or delete branches
27 error    checkout   Switch branches or restore working tree files
27 error    commit     Record changes to the repository
27 error    diff       Show changes between commits, commit and working tree, etc
27 error    merge      Join two or more development histories together
27 error    rebase     Reapply commits on top of another base tip
27 error    tag        Create, list, delete or verify a tag object signed with GPG
27 error
27 error collaborate (see also: git help workflows)
27 error    fetch      Download objects and refs from another repository
27 error    pull       Fetch from and integrate with another repository or a local branch
27 error    push       Update remote refs along with associated objects
27 error
27 error 'git help -a' and 'git help -g' list available subcommands and some
27 error concept guides. See 'git help <command>' or 'git help <concept>'
27 error to read about a specific subcommand or concept.
27 error
27 error     at makeError (/Users/kirilsdev/Documents/code/rf-os/node_modules/execa/index.js:174:9)
27 error     at Promise.all.then.arr (/Users/kirilsdev/Documents/code/rf-os/node_modules/execa/index.js:278:16)
<!-- Otherwise, feel free to delete this <details> block -->

Context

Your Environment

Executable Version
lerna --version 3.14.0
npm --version 6.2.0
yarn --version 1.9.4
node --version 10.9.0
OS Version
Mac OS 10.14.2
@evocateur
Copy link
Member

  1. You can't configure scope for lerna publish, it should be removed from lerna.json.
  2. "Durable" concurrency (that is, specified in lerna.json) should either be at the root (a sibling of command) or a child of a specific command.<foo>. Specifying it at command.concurrency should have no effect? (unclear why you're limiting it to 1, considering most of Lerna's speed comes from concurrency)
  3. I need more from the lerna-debug.log file, specifically the lines previous to the error logs, they might indicate what method was entered or command attempted.

@evocateur
Copy link
Member

augh, i found it:

return exec("git", "status -s", options).then(transformOutput);

(the second argument should be an array of arguments, not a string)

@evocateur
Copy link
Member

Fixed in v3.14.1, thanks for opening the issue!

@kirjai
Copy link
Author

kirjai commented May 15, 2019

thanks for fixing so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants