Remove environment.Environment struct
This commit completely removes the environment struct as it is no longer used.
This commit is contained in:
parent
3263920d6b
commit
473040a69f
40 changed files with 91 additions and 146 deletions
|
|
@ -5,7 +5,6 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/bootstrap"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
|
||||
)
|
||||
|
||||
|
|
@ -34,7 +33,7 @@ func (pcfg PathsConfig) ExecutablePath() string {
|
|||
}
|
||||
|
||||
// UsingDistilleryExecutable checks if the current process is using the distillery executable
|
||||
func (pcfg PathsConfig) UsingDistilleryExecutable(env environment.Environment) bool {
|
||||
func (pcfg PathsConfig) UsingDistilleryExecutable() bool {
|
||||
exe, err := os.Executable()
|
||||
if err != nil {
|
||||
return false
|
||||
|
|
@ -44,7 +43,7 @@ func (pcfg PathsConfig) UsingDistilleryExecutable(env environment.Environment) b
|
|||
|
||||
// CurrentExecutable returns the path to the current executable being used.
|
||||
// When it does not exist, falls back to the default executable.
|
||||
func (pcfg PathsConfig) CurrentExecutable(env environment.Environment) string {
|
||||
func (pcfg PathsConfig) CurrentExecutable() string {
|
||||
exe, err := os.Executable()
|
||||
if err != nil || !fsx.IsFile(exe) {
|
||||
return pcfg.ExecutablePath()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue