Skip to content

Fix Comparison Operators and Command Substitution in makestudy Script. #127

Closed

Description

@saksham-gera

The makestudy Bash script has several issues related to comparison operators and command substitution that can cause errors or compatibility problems. Below are the identified issues and suggested fixes:

  1. Equality Operator (== vs =) for Numerical Comparison

  2. osascript Check Exit Code Handling ($? Comparison)
    Fix: Use -eq for numerical comparisons.

  3. Directory Existence Check in makestudy Script
    issue: The script uses -e to check for directory existence, which detects both files and directories. This can cause conflicts if a file with the same name as the study directory exists, even though it should not prevent study creation.
    Fix: Use -d to specifically check for directories

Activity

  1. saksham-gera commented on Feb 15, 2025

    @saksham-gera
    ContributorAuthor

    @pradeeban these are small issues, just let me know if i should fix these in my next PR or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions