Dan Anglin
7e4b8bb05f
Changes: - Fixed the issue where the instance's FQDN was not included in the cache directories' path when the user sets a custom path to the root cache directory. - Added unit tests for the cache directory calculations. - Updated REUSE.toml to fix compliance failures. - Added small changes/fixes based on feedback from golangci-lint. PR: #53 Resolves: #51
16 lines
274 B
Go
16 lines
274 B
Go
package utilities_test
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func projectRoot() (string, error) {
|
|
cwd, err := os.Getwd()
|
|
if err != nil {
|
|
return "", fmt.Errorf("unable to get the current working directory, %w", err)
|
|
}
|
|
|
|
return filepath.Join(cwd, "..", ".."), nil
|
|
}
|