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

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.
@Ayoub-Mabrouk Ayoub-Mabrouk requested a review from mkaput as a code owner November 5, 2024 00:11
@@ -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

@mkaput
Copy link
Member

mkaput commented Dec 4, 2024

closing due to inactivity

@mkaput mkaput closed this Dec 4, 2024
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