Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix file executable permissions check error on macos in docker container
On macOS Sonoma v14.5, it was discovered that when using avocado in a Docker container to run scripts without execute permissions, they are considered to have executable permissions. By directly reading the file's permission bits, the stat method can provide more accurate permission check results, especially in cases where user context and file system characteristics might affect the behavior of os.access. This method is closer to the underlying implementation of the file system, thus providing consistent results across different environments (such as inside and outside Docker containers). After entering the container using docker exec -it container bash, use the stat command to check the file permission bits. Reference: #5945 Signed-off-by: Kui Li <[email protected]>
- Loading branch information