Skip to content

feat: Add option to print logs of prepublishOnly script #886

Open

Description

@PYPL-Song

Affected Packages

cli

Problem

Can not get the logs of prepublishOnly script while executing changeset publish

The script failed with error code: 1 command failed without any useful informattion. it's not easy to debug.

Example

info Publishing "@my/package" at "1.0.0"
error an error occurred while publishing @my/package
error sh -c npm run build:lib && npm run release:artifact
error npm ERR! code 1
error npm ERR! path /var/lib/workspace/package_main/packages/packgae1
error npm ERR! command failed
error npm ERR! command sh -c npm run build:lib && npm run release:artifact
error {
error   "error": {
error     "code": 1,
error     "summary": "command failed",
error     "detail": "sh -c npm run build:lib && npm run release:artifact"
error   }
error }
error 
error npm ERR! A complete log of this run can be found in:
error npm ERR!     /root/.npm/_logs/2022-07-23T19_57_36_484Z-debug.log
error 
error packages failed to publish: @my/[email protected]

Proposed solution

changeset publish --logs
changeset publish --verbose

Activity

  1. changed the title [-]feat: Add option to print logs of prepublishOnly script[/-] [+]feat: Add option to print logs of `prepublishOnly` script[/+] on Jul 23, 2022
  2. vronifuchsberger commented on Aug 22, 2022

    @vronifuchsberger

    Yes, this would be immensely helpful! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions