Skip to content

[Bug]: PnpmProject config without options crashes github action #6

@snehalbaghel

Description

@snehalbaghel

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

I get the following error:

Error: Cannot read properties of undefined (reading 'exec')
file:///home/runner/work/_actions/TrigenSoftware/simple-release-action/v1/node_modules/@simple-release/github-action/dist/conditions.js:5
    const message = await gitClient.exec('log', '-1', '--pretty=%B');
                                    ^

TypeError: Cannot read properties of undefined (reading 'exec')
    at ifReleaseCommit (file:///home/runner/work/_actions/TrigenSoftware/simple-release-action/v1/node_modules/@simple-release/github-action/dist/conditions.js:5:37)
    at file:///home/runner/work/_actions/TrigenSoftware/simple-release-action/v1/src/index.js:60:35

Project config:

.simple-release.json

{
  "project": ["@simple-release/pnpm#PnpmProject"],
   ....
}

To fix it:

.simple-release.json

{
  "project": ["@simple-release/pnpm#PnpmProject", { "path": "package.json" }],
   ....
}

Reproduction

package version

2.3.0

Possible solution

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions