Skip to content

Commit

Permalink
Revert "chore: add OS constraints"
Browse files Browse the repository at this point in the history
This reverts commit f97f090.
  • Loading branch information
Vendrell, Dionisio[RTL Tech-Extern] authored and MichaelEischer committed Jul 5, 2024
1 parent 51b7b70 commit 8f382a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/auth/yaml_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"

"github.com/charmbracelet/log"
Expand All @@ -26,8 +25,7 @@ type YamlStorage struct {
func (y *YamlStorage) Setup(config config.AuthStorage, encryptionPassphrase string) error {
y.StorageEncryptionKey = encryptionPassphrase
y.StoragePath = config.Config["path"].(string)
if strings.HasPrefix(y.StoragePath, "~/") && (runtime.GOOS == "linux" || runtime.GOOS == "darwin") ||
strings.HasPrefix(y.StoragePath, "%userprofile%") && runtime.GOOS == "windows" {
if strings.HasPrefix(y.StoragePath, "~/") {
homeDir, err := os.UserHomeDir()
if err != nil {
return err
Expand Down

0 comments on commit 8f382a2

Please sign in to comment.