You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests in xCode, the ProgressBar test cause the `update(percent:text)` function to crash since `term.width` is `zero` and `prefix.utf8.count` = 3.
Doing a little research:
When getting the `terminalWidth()` in `TerminalController.swift` :
1. `SPMLibc.getenv("COLUMNS")` is returning `nil`
Therefore, we cannot get the term width from the environment.
2. Then, when trying to determine using ioctl, `winSize()` returns `zero`.
[I still need to dig a little deeper into what `ioctl(,,_)` is actually doing], but it is returning `true`, therefore, that function returns `ws_col` which is zero sin winSize is zero.
So, going back to the TerminalController initializer, it does `width = TerminalController.terminalWidth() ?? 80` since TerminalController.terminalWidth() returns zero, not nil, our terminalController width equals zero, and that’s why that’s failing.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
MacOS Mojave 10.14
Xcode 10
Additional Detail from JIRA
md5: 1e198b9064d96c3e663499998bb7ca01
Issue Description:
When running tests in xCode, the ProgressBar test cause the `update(percent:text)` function to crash since `term.width` is `zero` and `prefix.utf8.count` = 3.
Doing a little research:
When getting the `terminalWidth()` in `TerminalController.swift` :
1. `SPMLibc.getenv("COLUMNS")` is returning `nil`
Therefore, we cannot get the term width from the environment.
2. Then, when trying to determine using ioctl, `winSize()` returns `zero`.
[I still need to dig a little deeper into what `ioctl(,,_)` is actually doing], but it is returning `true`, therefore, that function returns `ws_col` which is zero sin winSize is zero.
So, going back to the TerminalController initializer, it does `width = TerminalController.terminalWidth() ?? 80` since TerminalController.terminalWidth() returns zero, not nil, our terminalController width equals zero, and that’s why that’s failing.
The text was updated successfully, but these errors were encountered: