WithWorkingDirectory defines ProjectOptions' working directory
(wd string)
| 120 | |
| 121 | // WithWorkingDirectory defines ProjectOptions' working directory |
| 122 | func WithWorkingDirectory(wd string) ProjectOptionsFn { |
| 123 | return func(o *ProjectOptions) error { |
| 124 | if wd == "" { |
| 125 | return nil |
| 126 | } |
| 127 | abs, err := filepath.Abs(wd) |
| 128 | if err != nil { |
| 129 | return err |
| 130 | } |
| 131 | o.WorkingDir = abs |
| 132 | return nil |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // WithConfigFileEnv allow to set compose config file paths by COMPOSE_FILE environment variable |
| 137 | func WithConfigFileEnv(o *ProjectOptions) error { |
no outgoing calls
searching dependent graphs…