Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

chore: add back traces when extracting the files from the box #946

Merged
merged 2 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
var deployToProfile string

func init() {
config.InitConfig()
config.Init()

for k := range config.AvailableServices() {
// deploy command
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var servicesToRun string
var versionToRun string

func init() {
config.InitConfig()
config.Init()

rootCmd.AddCommand(runCmd)

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
var versionToStop string

func init() {
config.InitConfig()
config.Init()

rootCmd.AddCommand(stopCmd)

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var excludedBlocks = []string{"build"}
var remote = "elastic:master"

func init() {
config.InitConfig()
config.Init()

syncIntegrationsCmd.Flags().BoolVarP(&deleteRepository, "delete", "d", false, "Will delete the existing Beats repository before cloning it again (default false)")
syncIntegrationsCmd.Flags().StringVarP(&remote, "remote", "r", "elastic:master", "Sets the remote for Beats, using 'user:branch' as format (i.e. elastic:master)")
Expand Down
10 changes: 10 additions & 0 deletions cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func GetServiceConfig(service string) (Service, bool) {

// Init creates this tool workspace under user's home, in a hidden directory named ".op"
func Init() {
if Op != nil {
return
}

configureLogger()

binaries := []string{
Expand Down Expand Up @@ -310,6 +314,12 @@ func extractProfileServiceConfig(op *OpConfig, box *packr.Box) error {
return err
}
}

log.WithFields(log.Fields{
"file": p,
"dir": dir,
}).Trace("Extracting boxed file")

return ioutil.WriteFile(p, []byte(file.String()), 0644)
}

Expand Down