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

Refactor getVersionFromToolVersionsFile function #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ayoub-Mabrouk
Copy link

  • Simplified parameter handling by providing a default value directly in the function signature.
  • Improved readability by removing unnecessary variable assignment.

- Simplified parameter handling by providing a default value directly in the function signature.
- Improved readability by removing unnecessary variable assignment.
@@ -106,14 +106,13 @@ function fetchLatestTag(repo) {
);
}

async function getVersionFromToolVersionsFile(toolVersionsPath) {
async function getVersionFromToolVersionsFile(toolVersionsPath = ".tool-versions") {
Copy link
Member

Choose a reason for hiding this comment

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

same story as in #28: this code doesn't cover this case:

"" || "foo" == "foo"

which we actually need, as it is pretty easy to declare the input but not set it in yaml

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.

2 participants