Skip to content

Commit 931561e

Browse files
committed
fix permission check
1 parent 7045e6c commit 931561e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cycode/cli/utils/yaml_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def read_yaml_file(filename: str) -> dict[Hashable, Any]:
4444

4545

4646
def write_yaml_file(filename: str, content: dict[Hashable, Any]) -> None:
47-
if not os.access(filename, os.W_OK):
47+
if not os.access(filename, os.W_OK) and os.path.exists(filename):
4848
logger.warning('No write permission for file. Cannot save config, %s', {'filename': filename})
4949
return
5050

0 commit comments

Comments
 (0)