Skip to content

Commit

Permalink
Cleanup, add some debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wyarde committed Apr 6, 2021
1 parent 9ac08f0 commit d24b547
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmd/agent/agent_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ func configureNpm() error {
log.Debug(" Npm NOT installed. Creating configuration files at the default locations.")

for _, prefix := range []string{"/usr", "/usr/local"} {
path := prefix + "/etc"
npmrcFile := path + "/npmrc"
path := filepath.Join(prefix, "etc")
npmrcFile := filePath.Join(path, "npmrc")

log.WithField("npmrcFile", npmrcFile).Debug()

_ = os.Mkdir(path, os.ModeDir)
f, err := os.OpenFile(npmrcFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
Expand Down

0 comments on commit d24b547

Please sign in to comment.