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

Move bash scripts to sh #124

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Conversation

lorenzodalaqua
Copy link
Contributor

Hello, first of all, great work on the project 😄

So, onto the PR:

Issue

We use this package in an application that is running Node in an Alpine Linux container where there is no bash, only sh is available.

Proposed solution

Changing shell scripts to be compatible with sh, which will make it compatible with environments where bash is not available, such as Alpine Linux.

I noticed the use of bash was in only two scripts. Aside from renaming the scripts and references from *.bash to *.sh, there was only one code change that was needed, in the conditional in the list-npx-cache script the test ([[) operator had to be changed to [ to be compatible with sh.

Let me know if these changes are acceptable so we can upgrade to the latest release of the project.

Thanks, have a great week!

* Change file names to .sh
* Change shebang
* Update references to files
* Use "[" operator in conditionals instead of
bash-specific "[[" operator
@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2022

⚠️ No Changeset found

Latest commit: baa97c7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #124 (baa97c7) into main (0639f83) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #124   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          146       146           
=========================================
  Hits           146       146           
Flag Coverage Δ
unit_tests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fdd4a0...baa97c7. Read the comment docs.

Copy link
Owner

@motss motss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@motss motss merged commit 9eb42ae into motss:main Mar 8, 2022
@lorenzodalaqua lorenzodalaqua deleted the move-bash-to-sh branch May 4, 2022 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants