Skip to content

Commit

Permalink
Refactoring more
Browse files Browse the repository at this point in the history
  • Loading branch information
hlafaille committed Sep 16, 2024
1 parent 4c9f908 commit ccd8742
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
14 changes: 13 additions & 1 deletion internal/context.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package internal

import "os"
import (
"errors"
"os"
)

// IsDebugMode returns if we should treat the current runtime context and all actions as debug mode.
// Debug mode is effectively wrapping all filesystem actions in the "espresso_debug" directory.
Expand All @@ -11,3 +14,12 @@ func IsDebugMode() bool {
}
return val == "1"
}

// GetJavaHome gets the value of the JAVA_HOME
func GetJavaHome() (*string, error) {
path, present := os.LookupEnv("JAVA_HOME")
if !present {
return nil, errors.New("java_home is not set")
}
return &path, nil
}
15 changes: 0 additions & 15 deletions toolchain/fs.go

This file was deleted.

0 comments on commit ccd8742

Please sign in to comment.