Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[cli]delete: keyring availability check

mngshm8d644ead1e0e
diff --git a/cli/main.go b/cli/main.go
index c9f65cbd89..e26a745799 100644
--- a/cli/main.go
+++ b/cli/main.go
@@ -127,14 +127,6 @@ func GetCLIConfigDir() (string, error) {
configDir = os.Getenv("ENTE_CLI_CONFIG_PATH")
}
- // Throw instructoin if none of the environment variables has been set.
- if configDir == "" && oldConfigPath == "" {
- if !secrets.IsKeyringAvailable() {
- fmt.Println(`Environment variable for the config dir is not set. Please setup
-the environment variable with export ENTE_CLI_CONFIG_DIR="/path/to/config"
- `)
- }
- }
if configDir != "" {
// remove trailing slash (for all OS)
configDir = strings.TrimSuffix(configDir, string(filepath.Separator))
diff --git a/cli/pkg/secrets/secret.go b/cli/pkg/secrets/secret.go
index 998c038a69..629604bde3 100644
--- a/cli/pkg/secrets/secret.go
+++ b/cli/pkg/secrets/secret.go
@@ -77,16 +77,6 @@ func GetOrCreateClISecret() []byte {
return legacySecret
}
-// Simple function to check if keyring is available or not
-func IsKeyringAvailable() bool {
- _, err := keyring.Get(secretService, secretUser)
-
- if err != nil && !errors.Is(err, keyring.ErrNotFound) {
- return false
- }
- return true
-}
-
// GetSecretFromSecretText reads the scecret from the secret text file.
// If the file does not exist, it will be created and write random keyLength bytes secret to it.
func GetSecretFromSecretText(secretFilePath string) []byte {