github.com/microsoft/fabrikate@v1.0.0-alpha.1.0.20210115014322-dc09194d0885/internal/installable/local.go (about)

     1  package installable
     2  
     3  import (
     4  	"os"
     5  	"path"
     6  )
     7  
     8  type Local struct {
     9  	Root string
    10  }
    11  
    12  func (l Local) Install() error {
    13  	componentPath := path.Join(l.Root)
    14  	if _, err := os.Stat(componentPath); os.IsNotExist(err) {
    15  		return err
    16  	}
    17  
    18  	return nil
    19  }
    20  
    21  func (l Local) GetInstallPath() (string, error) {
    22  	return l.Root, nil
    23  }
    24  
    25  func (l Local) Validate() error {
    26  	return nil
    27  }