Closed khwong-c closed 6 months ago
SBY failed to remove the existing directory when
-f
stdin
The script produced a log of Removing directory but it doesn't really take effect.
Removing directory
cmd='sby -f -T "default" --prefix "/home/khwong/.config/JetBrains/PyCharm2023.3/scratches/delay"' SBY 15:55:26 [/home/khwong/.config/JetBrains/PyCharm2023.3/scratches/delay_default] Removing directory '/home/khwong/.config/JetBrains/PyCharm2023.3/scratches/delay_default'. ERROR: Directory '/home/khwong/.config/JetBrains/PyCharm2023.3/scratches/delay_default' already exists, use -f to overwrite the existing directory.
sbyfile is None when the SBY script is inputted from stdin https://github.com/YosysHQ/sby/blob/e30a0fe611fb1a0dea3808a130308b2d34443d86/sbysrc/sby.py#L422-L427
sbyfile
I doubt if the if sbyfile: check is used to protect the directory from multiple tasks running concurrently. @cliffordwolf would you mind having a check on this script?
if sbyfile:
Situation
SBY failed to remove the existing directory when
-f
is providedstdin
The script produced a log of
Removing directory
but it doesn't really take effect.Bug Caused by
sbyfile
is None when the SBY script is inputted fromstdin
https://github.com/YosysHQ/sby/blob/e30a0fe611fb1a0dea3808a130308b2d34443d86/sbysrc/sby.py#L422-L427