xalanq / cf-tool

:bar_chart: Codeforces CLI (Submit, Parse, Test, etc.). Support Contests, Gym, Groups, acmsguru, Windows, macOS, Linux, 7 MB
MIT License
1.32k stars 227 forks source link

There are multiple languages that match the File #171

Closed BGOPC closed 7 months ago

BGOPC commented 7 months ago

Get this thing whenever I try to submit: image ~/.cf/config:

{
  "template": [
    {
      "alias": "cf",
      "lang": "54",
      "path": "/home/bgopc/template/cf.cpp",
      "suffix": [
        "cpp"
      ],
      "before_script": "g++ $%full%$ -o $%file%$.out -Wall -Wextra -O2 -fno-sanitize-recover -fstack-protector -std=c++17",
      "script": "./$%file%$.out",
      "after_script": "rm $%file%$.out"
    },
    {
      "alias": "cf2",
      "lang": "54",
      "path": "/home/bgopc/template/cf_dirty.cpp",
      "suffix": [
        "cpp"
      ],
      "before_script": "g++ $%full%$ -o $%file%$.out -Wall -Wextra -O2 -fno-sanitize-recover -fstack-protector -std=c++17",
      "script": "./$%file%$.out",
      "after_script": "rm ./$%file%$.out"
    }
  ],
  "default": 0,
  "gen_after_parse": true,
  "host": "https://codeforces.com",
  "proxy": "",
  "folder_name": {
    "acmsguru": "acmsguru",
    "contest": "contest",
    "group": "group",
    "gym": "gym",
    "root": "cf"
  }
}
BGOPC commented 7 months ago

Found the reason, when you have more than 1 template of the same suffix it happens, unfortunately I don't know GO otherwise I would've created a fork