HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
295 stars 37 forks source link

[BUG] uptime: /dev/ttys010: No such file or directory #132

Closed MilesTEG1 closed 1 year ago

MilesTEG1 commented 1 year ago

Describe the bug When launching archey, this message is shown at the very beginning output:

uptime: /dev/ttys010: No such file or directory

Expected behavior Not show this error.

Screenshots image

Environment

Additional context

Custom configuration

Custom configuration

```json { "allow_overriding": true, "parallel_loading": true, "suppress_warnings": false, "entries_color": "", "honor_ansi_color": true, "logo_style": "retro", "entries": [ { "type": "User" }, { "type": "Hostname" }, { "type": "Model" }, { "type": "Distro" }, { "type": "Kernel", "check_version": false }, { "type": "Uptime" }, { "type": "LoadAverage", "decimal_places": 2, "warning_threshold": 1.0, "danger_threshold": 2.0 }, { "type": "Processes" }, { "type": "WindowManager" }, { "type": "DesktopEnvironment" }, { "type": "Shell" }, { "type": "Terminal", "use_unicode": true }, { "type": "Packages" }, { "type": "Temperature", "char_before_unit": " ", "sensors_chipsets": [], "sensors_excluded_subfeatures": [], "use_fahrenheit": false }, { "type": "CPU", "one_line": false, "show_cores": true }, { "type": "GPU", "one_line": false, "max_count": 2 }, { "type": "RAM", "warning_use_percent": 33.3, "danger_use_percent": 66.7 }, { "type": "Disk", "show_filesystems": ["local"], "combine_total": true, "disk_labels": null, "hide_entry_name": null, "warning_use_percent": 50, "danger_use_percent": 75 }, { "type": "LAN_IP", "one_line": true, "max_count": 2, "show_global": false, "ipv6_support": false }, { "type": "WAN_IP", "one_line": true, "ipv4": { "dns_query": "myip.opendns.com", "dns_resolver": "resolver1.opendns.com", "dns_timeout": 1, "http_url": "https://v4.ident.me/", "http_timeout": 1 }, "ipv6": { "dns_query": "myip.opendns.com", "dns_resolver": "resolver1.opendns.com", "dns_timeout": 1, "http_url": "https://v6.ident.me/", "http_timeout": 1 } } ], "default_strings": { "latest": "latest", "available": "available", "no_address": "No Address", "not_detected": "Not detected", "virtual_environment": "Virtual Environment" } } ```

ingrinder commented 1 year ago

This appears to be a bug in macOS itself:

https://apple.stackexchange.com/questions/383653/why-does-uptime-want-dev-ttys021-no-such-file-or-directory https://apple.stackexchange.com/questions/85520/uptime-dev-ttys003-no-such-file-or-directory

@HorlogeSkynet is this something we should try to hide from the user as a workaround?

HorlogeSkynet commented 1 year ago

Interesting, thanks for digging this up ! Maybe we can catch STDERR output and emit a warning using the entry logger, as done for Temperature and lm_sensors errors ? Using a configuration option already existing, one could easily silence those.

Tell me what you think about it 🙂

HorlogeSkynet commented 1 year ago

Closing here in favor of #133.