ramasilveyra / gitpkg

Publish packages as git tags
MIT License
274 stars 27 forks source link

`"publish": "gitpkg publish"` calls itself recursively #59

Closed appsforartists closed 2 years ago

appsforartists commented 2 years ago

From https://github.com/google/wireit/issues/273#issuecomment-1146144318:

had a little dig, its an infinite loop!

await execLifecycleScript('publish', this.pkg, pkgPath);

It looks like setting "publish": "gitpkg publish" in package.json causes gitpkg to call itself recursively. It will throw an error if run naked (because the second tag push will fail), but causes the wireit script runner to hang.

@ramasilveyra do you recall why this line is there? Can we safely remove it (or make it optional, or detect and abort the recursive invocation)?

ramasilveyra commented 2 years ago

Fixed with https://github.com/ramasilveyra/gitpkg/commit/439f75e94f8685f50587f8937036ad05fdae02fe and released in v1.0.0-beta.3