From 73a38e90831a5f4ad14f9e1504ecc7225b1dc3bf Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Fri, 24 May 2024 11:28:23 -0300 Subject: [PATCH] fix: commands flags not being parsed --- cmd/build/main.go | 2 ++ cmd/vercel/main.go | 2 ++ main.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/cmd/build/main.go b/cmd/build/main.go index e8d73aa..5f30256 100644 --- a/cmd/build/main.go +++ b/cmd/build/main.go @@ -13,6 +13,8 @@ func main() { dir := flag.String("d", "./dist", "the directory to write the files") staticDir := flag.String("s", "./static", "the directory to copy static files from") + flag.Parse() + w := internals.StaticWriter{ DistDir: dir, StaticDir: staticDir, diff --git a/cmd/vercel/main.go b/cmd/vercel/main.go index e321e6e..06ea52e 100644 --- a/cmd/vercel/main.go +++ b/cmd/vercel/main.go @@ -24,6 +24,8 @@ func main() { staticDir := flag.String("s", "./static", "the directory to copy static files from") port := flag.Int("p", 8080, "the port to run the server") + flag.Parse() + configFile, err := os.ReadFile(*configPath) if err != nil { logger.Fatalf("Unable to read vercel.json file due to:\n%s", err) diff --git a/main.go b/main.go index 1d3228a..14e690f 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,8 @@ func main() { staticDir := flag.String("s", "./static", "the directory to copy static files from") port := flag.Int("p", 8080, "the port to run the server") + flag.Parse() + mux := http.NewServeMux() config.APIROUTES(mux)