Skip to content

Application breaks when a file named stdin is in the exercises directory #60

@NicksPatties

Description

@NicksPatties

Describe the bug
If there is a file in the exercises directory called "stdin", the application will crash if it's randomly selected

To Reproduce
Steps to reproduce the behavior:

  1. move your exercise files from the exercise directory elsewhere
  2. echo "haha" >> ~/.config/sweet/exercises/stdin
  3. sweet

Output
panic: runtime error: index out of range [1] with length 1

Expected behavior
I expect a file named stdin would not break the program

Sweet version
v0.2.0

Desktop (please complete the following information):

  • OS: Pop_OS
  • Version: 22.04 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2 - mediumTask that'll be completed in the next sprint

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions