Skip to content

Commit

Permalink
Disable config permissions check on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pjob committed Mar 6, 2024
1 parent 90b3ad3 commit ddd189b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/snowflake/cli/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)
from snowflake.cli.api.secure_path import SecurePath
from snowflake.cli.api.secure_utils import file_permissions_are_strict
from snowflake.connector.compat import IS_WINDOWS
from snowflake.connector.config_manager import CONFIG_MANAGER
from snowflake.connector.constants import CONFIG_FILE, CONNECTIONS_FILE
from snowflake.connector.errors import MissingConfigOptionError
Expand Down Expand Up @@ -206,6 +207,8 @@ def _dump_config(conf_file_cache: Dict):


def _check_default_config_files_permissions() -> None:
if IS_WINDOWS:
return
if CONNECTIONS_FILE.exists() and not file_permissions_are_strict(CONNECTIONS_FILE):
raise ConfigFileTooWidePermissionsError(CONNECTIONS_FILE)
if CONFIG_FILE.exists() and not file_permissions_are_strict(CONFIG_FILE):
Expand Down

0 comments on commit ddd189b

Please sign in to comment.