diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-03 00:02:31 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-03 00:02:31 -0500 |
commit | 287d029975b7718109f81b480079f375f7d8700a (patch) | |
tree | 2324f902ebc59ffda5afa2e7506e3fa0ac9b51b3 /cmd | |
parent | d078f6dc10eb265a5d88cd96adf86173d6d3ba2e (diff) | |
download | planr-287d029975b7718109f81b480079f375f7d8700a.tar.xz planr-287d029975b7718109f81b480079f375f7d8700a.zip |
Add clean option and fix issue with dir propegation
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/planr/main.go | 4 | ||||
-rw-r--r-- | cmd/planr/sub/build.go | 2 | ||||
-rw-r--r-- | cmd/planr/sub/clean.go | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/cmd/planr/main.go b/cmd/planr/main.go index e2a85ed..4b69a36 100644 --- a/cmd/planr/main.go +++ b/cmd/planr/main.go @@ -19,6 +19,8 @@ func printUsage(w io.Writer) { fmt.Fprintln(w, " version ") fmt.Fprintln(w, " build ") fmt.Fprintln(w, " evaluate ") + fmt.Fprintln(w, " clean ") + } func dieUsage() { @@ -45,6 +47,8 @@ func main() { sub.Build(subargs) case "evaluate","eval": sub.Evaluate(subargs) + case "clean": + sub.Clean(subargs) case "help", "-h", "-help", "--help": printUsage(os.Stdout) default: diff --git a/cmd/planr/sub/build.go b/cmd/planr/sub/build.go index a8b19ec..142ef1c 100644 --- a/cmd/planr/sub/build.go +++ b/cmd/planr/sub/build.go @@ -11,7 +11,7 @@ func Runner() planr.Runner { r.RegisterAdapter(>est.GtestAdapter{}) - if wd, err := os.Getwd(); err != nil { + if wd, err := os.Getwd(); err == nil { r.SetConfigDirFromTree(wd) } diff --git a/cmd/planr/sub/clean.go b/cmd/planr/sub/clean.go new file mode 100644 index 0000000..d40e967 --- /dev/null +++ b/cmd/planr/sub/clean.go @@ -0,0 +1,5 @@ +package sub + +func Clean(params []string) { + Runner().Clean() +} |