Skip to content

Commit

Permalink
Update run.py
Browse files Browse the repository at this point in the history
Add Bash and Sh as allowed languages.
  • Loading branch information
skiros-habib authored Jul 17, 2023
1 parent 513b2e1 commit 5d93b1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cogs/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Language(Enum):
Python = "Python"
Rust = "Rust"
Java = "Java"
Bash = "Bash"
Sh = "Sh"

@staticmethod
def from_str(lang: str):
Expand All @@ -23,6 +25,10 @@ def from_str(lang: str):
return Language.Java
case "rust" | "rs":
return Language.Rust
case "bash":
return Language.Bash
cash "sh":
return Language.Sh
case "":
raise Exception(f"No language provided!")
case _:
Expand All @@ -40,6 +46,8 @@ def from_str(lang: str):
- Python
- Rust
- Java
- GNU Bourne Again Shell (bash)
- Busybox ash (sh)
"""

SHORT_HELP_TEXT = """Run some code!"""
Expand Down

0 comments on commit 5d93b1b

Please sign in to comment.