Allow for ${ENV_VARIABLES} in paths. Also ~ is now supported, even on windows.

This commit is contained in:
2024-11-21 11:19:28 +01:00
parent 48b15de4c5
commit 4b0bfa8e4c
4 changed files with 76 additions and 6 deletions

View File

@ -7,15 +7,12 @@ import (
"path/filepath"
"github.com/evanw/esbuild/pkg/api"
"github.com/trading-peter/gowebbuild/fsutils"
"github.com/urfave/cli/v2"
)
func buildAction(ctx *cli.Context) error {
cfgPath, err := filepath.Abs(ctx.String("c"))
if err != nil {
return err
}
cfgPath := fsutils.ResolvePath(ctx.String("c"))
os.Chdir(filepath.Dir(cfgPath))
opts := readCfg(cfgPath)