Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Don't test "Resource busy" when detaching (#200)
1. We have EBUSY (code 16) https://ss64.com/osx/hdiutil.html said: > [EBUSY] Resource busy. Used if necessary exclusive access cannot be obtained. This error often appears when a volume can't be unmounted. "EBUSY" can be found in /sys/errno.h of the BSD kernel: https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/errno.h#L108 : > #define EBUSY 16 /* Device / Resource busy */ https://github.com/freebsd/freebsd-src/blob/1e0a518d65488caafff89a4ecba9cfb2be233379/sys/sys/errno.h#L69 : > #define EBUSY 16 /* Device busy */ 2. Error messages will be localized For example: | Language | "Resource busy" | -------- | --------------- | Chinese | 资源忙 | Chinese | 資源忙碌中 | Japanese | リソースが使用中です | Russian | Ресурс занят 3. Conculsion We should not test the content of the error message. Just testing the exit code "16" is sufficient and reliable.
- Loading branch information