Skip to content

Commit

Permalink
fix: Use homedir.Expand
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcarnie committed Jun 6, 2020
1 parent 264ecfe commit c1f8517
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 50 deletions.
48 changes: 0 additions & 48 deletions process/path.go

This file was deleted.

5 changes: 3 additions & 2 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"syscall"
"time"

"github.com/mitchellh/go-homedir"
"github.com/ochinchina/filechangemonitor"
"github.com/robfig/cron/v3"
"github.com/stuartcarnie/gopm/logger"
Expand Down Expand Up @@ -303,7 +304,7 @@ func (p *Process) StopTime() time.Time {
// GetStdoutLogfile get the program stdout log file
func (p *Process) StdoutLogfile() string {
fileName := p.program.StdoutLogFile
expandFile, err := PathExpand(fileName)
expandFile, err := homedir.Expand(fileName)
if err != nil {
return fileName
}
Expand All @@ -313,7 +314,7 @@ func (p *Process) StdoutLogfile() string {
// GetStderrLogfile get the program stderr log file
func (p *Process) StderrLogfile() string {
fileName := p.program.StderrLogFile
expandFile, err := PathExpand(fileName)
expandFile, err := homedir.Expand(fileName)
if err != nil {
return fileName
}
Expand Down

0 comments on commit c1f8517

Please sign in to comment.