Skip to content

Commit

Permalink
Move init and destroy to root cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
saheljalal committed Sep 2, 2019
1 parent d3ea141 commit 6bf90b4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ go get -u github.com/pokanop/nostromo
### Initialization
This command will initialize nostromo and create a manifest under `~/.nostromo`:
```sh
nostromo manifest init
nostromo init
```

## Key Features
Expand Down
2 changes: 1 addition & 1 deletion cmd/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ The config file is located at ~/.nostromo/config`,
}

func init() {
manifestCmd.AddCommand(destroyCmd)
rootCmd.AddCommand(destroyCmd)
}
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ The config file is located at ~/.nostromo/config`,
}

func init() {
manifestCmd.AddCommand(initCmd)
rootCmd.AddCommand(initCmd)
}
2 changes: 0 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"github.com/pokanop/nostromo/pathutil"
)

var cfg *Config

// ConfigPath for standard nostromo config
const ConfigPath = "~/.nostromo/manifest"

Expand Down
6 changes: 6 additions & 0 deletions task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func DestroyConfig() {
log.Error(err)
return
}

err = shell.Commit(model.NewManifest())
if err != nil {
log.Error(err)
return
}
}

// ShowConfig for nostromo config file
Expand Down

0 comments on commit 6bf90b4

Please sign in to comment.