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: command_exists #394

Merged

Conversation

jeevithakannan2
Copy link
Contributor

@jeevithakannan2 jeevithakannan2 commented Sep 15, 2024

Pull Request

Title

Refactor command_exists function to use command -v instead of which

Type of Change

  • Refactoring

Description

command_exists function uses which, that is not POSIX-compliant that may result in error in some systems. A simple refactor to command -v solves the issue. command -v is also a POSIX-compliant built-in command.

Issue related to PR

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no errors/warnings/merge conflicts.

Copy link
Contributor

@nnyyxxxx nnyyxxxx left a comment

Choose a reason for hiding this comment

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

Thanks.

@ChrisTitusTech ChrisTitusTech added the bug Something isn't working label Sep 19, 2024
@ChrisTitusTech ChrisTitusTech merged commit 265fbbb into ChrisTitusTech:main Sep 19, 2024
1 check passed
@jeevithakannan2 jeevithakannan2 deleted the common-script-fix branch September 19, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants