Allow for ${ENV_VARIABLES} in paths. Also ~ is now supported, even on windows.
This commit is contained in:
7
build.go
7
build.go
@ -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)
|
||||
|
Reference in New Issue
Block a user