Skip to content

Commit

Permalink
config: InternalCompatibilityFlags: add SudoOrDefault accessor (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
damdo committed Oct 10, 2023
1 parent 5f469e7 commit a93c67a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ func (s *Struct) FormatForFile() ([]byte, error) {
return b, nil
}

func (i *InternalCompatibilityFlags) SudoOrDefault() string {
if i.Sudo == "" {
return "auto"
}

return i.Sudo
}

func InstancePath() string {
return filepath.Join(instanceflag.ParentDir(), instanceflag.Instance())
}
Expand Down

0 comments on commit a93c67a

Please sign in to comment.