Switch default config file to ./config.lua, not ./config.json (fix #33)

This commit is contained in:
Noah 2024-03-27 11:45:37 -05:00
parent fc4f0affc2
commit ba71b42369

View File

@ -75,7 +75,7 @@ func handler(data map[string]interface{}) {
func main() { func main() {
// Parse arguments // Parse arguments
parser := argparse.NewParser("lapisdeploy", "Easily deploy Lapis web applications through Gitea webhooks") parser := argparse.NewParser("lapisdeploy", "Easily deploy Lapis web applications through Gitea webhooks")
config_path := parser.String("c", "config", &argparse.Options{Required: false, Help: "Configuration file", Default: "./config.json"}) config_path := parser.String("c", "config", &argparse.Options{Required: false, Help: "Configuration file", Default: "./config.lua"})
disable_matrix := parser.Flag("M", "disable-matrix", &argparse.Options{Required: false, Help: "Disable Matrix chat bot", Default: false}) disable_matrix := parser.Flag("M", "disable-matrix", &argparse.Options{Required: false, Help: "Disable Matrix chat bot", Default: false})
if err := parser.Parse(os.Args); err != nil { // Parse arguments if err := parser.Parse(os.Args); err != nil { // Parse arguments
fmt.Print(parser.Usage(err)) // Show usage if there's an error fmt.Print(parser.Usage(err)) // Show usage if there's an error