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

Remove 'publish' script if it's 'clean-publish' #135

Merged
merged 2 commits into from Dec 4, 2021
Merged

Remove 'publish' script if it's 'clean-publish' #135

merged 2 commits into from Dec 4, 2021

Conversation

kytta
Copy link
Contributor

@kytta kytta commented Dec 4, 2021

If someone would try setting up 'clean-publish' as told in the docs,
one would get an endless loop when trying to call 'npm publish'. This
is because 'publish' scripts were not removed but called after cleanup,
which would then cause the program to loop endlessly and creates an
infinite tree of temporary directories.

After this commit, 'clean-publish' will check if the 'publish' script
contains call to 'clean-publish' and, if that's the case, remove this
script.

Closes #134

If someone would try setting up 'clean-publish' as told in the docs,
one would get an endless loop when trying to call 'npm publish'. This
is because 'publish' scripts were not removed but called after cleanup,
which would then cause the program to loop endlessly and creates an
infinite tree of temporary directories.

After this commit, 'clean-publish' will check if the 'publish' script
contains call to 'clean-publish' and, if that's the case, remove this
script.

Closes #134
core.js Outdated Show resolved Hide resolved
Check if the script is *exactly* 'clean-publish' or starts with
'clean-publish ' (= is a clean-publish call with arguments)
@ai ai merged commit 811ec5b into shashkovdanil:master Dec 4, 2021
@ai
Copy link
Collaborator

ai commented Dec 4, 2021

Thanks. Released in 3.4.4.

ai added a commit that referenced this pull request Jan 19, 2022
Remove 'publish' script if it's 'clean-publish'
ai added a commit that referenced this pull request Jan 19, 2022
Remove 'publish' script if it's 'clean-publish'
ai added a commit that referenced this pull request Jan 19, 2022
Remove 'publish' script if it's 'clean-publish'
ai added a commit that referenced this pull request Apr 11, 2023
Remove 'publish' script if it's 'clean-publish'
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

Successfully merging this pull request may close these issues.

Scripts aren't ignore, which causes an endless loop
2 participants