memo33 / sc4pac-tools

Package manager for SC4
https://memo33.github.io/sc4pac/
GNU General Public License v3.0
9 stars 1 forks source link

Unexpected ouput and missing text on "update" command #8

Closed Zasco closed 1 week ago

Zasco commented 2 weeks ago

Since upgrading to 0.4.5, I get unexpected outputs (←8) and missing texts when using the "update" command. Here are examples:

***\sc4pac\releases\latest>sc4pac update
The following packages will be removed:
    bsc:mega-props-d66-vol03 1
    lbt:mega-prop-pack-vol01 3.0
    lbt:wal-mart-supercenter-v2 1.0
    walkingsnake:parking-textures-vol1 1
The following packages will be installed:
    bsc:essentials 2024b
    bsc:mega-props-mjb-vol01 3
    bsc:mega-props-sg-vol01 4
    bsc:textures-vol01 1-1
    simgoober:mobile-homes 1.03
Continue? [Yes/no]:
←8(1/5) Extracting bsc:mega-props-mjb-vol01 ??????
←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8      ←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8
←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8      ←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8(2/5) Extracting bsc:essentials 2024b
←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←      8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8(3/5) Extracting bsc:mega-props-sg-vol01 4
←8←8←8←8←8←8←8←8(4/5) Extracting bsc:tex      vol01 1-1
←8←8←8←8←8←8(5/5) Extracting simgoober:mobile       1.03
←8Moving extracted files to plugins folder
←8←8←8←8←8←8←8←8←8←8←8←8←8←8Done.
***\sc4pac\releases\latest>
**&**
←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8←8(1/1)       ting null-45:dbpf-loading 1.0.4
←8←8←8←8←8←8Moving extracted files to plug      lder.
←8←8←8←8←8←8←8←8←8←8Done.
memo33 commented 2 weeks ago

Thanks for the report. I've looked through the changes of the upstream library "jansi" and found the relevant change (see https://github.com/fusesource/jansi/issues/226). Fortunately, it's possible to revert to the previous behavior, which I've implemented in 0.4.6-SNAPSHOT, so you can test it.

The fix might not work for the inbuilt macOS Term.app, as documented in that issue. If anyone encounters that problem, we can look into a platform-specific fix.

For clarification, the ←8 are escape codes to control cursor positioning that shouldn't normally be printed. After the progress bar is finished, I overwrite it with spaces to hide it. As the cursor is at an unexpected position due to the extra printed output, the spaces end up in the wrong place leading to some obscured characters.

Zasco commented 1 week ago

Solved in 0.4.6-SNAPSHOT.