-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
📝 Issue Description
First, thank you for creating this valuable plugin! I've been attempting to integrate it into my workflow, but I'm encountering an issue where the --json
flag is being ignored in the GitHub Actions environment.
🐛 Bug Details
When the action runs forge inspect {contract} storage-layout --json
, it's receiving a formatted table output with borders (starting with ╭
) instead of JSON. This causes the JSON parser to fail with:
Error: SyntaxError: Unexpected token '╭', "
╭---------"... is not valid JSON
💻 Environment
- GitHub Actions runner
- Using version v3.8 of the foundry-storage-check action
- The contract being checked is a Solidity contract with complex inheritance
📋 Error Output
Generate storage layout of contract "src/shmonad/ShMONAD.sol:ShMonad" using foundry forge
Start forge process
Parse generated layout
Error while parsing storage layout:
╭---------------------+-------------------------------------------------------------+------+--------+-------+---------------------------------╮
| Name | Type | Slot | Offset | Bytes | Contract |
+=============================================================================================================================================+
| s_policyCount | uint64 | 0 | 0 | 8 | src/shmonad/ShMONAD.sol:ShMonad |
...
╰---------------------+-------------------------------------------------------------+------+--------+-------+---------------------------------╯
Error: SyntaxError: Unexpected token '╭', "
╭---------"... is not valid JSON
🔍 Investigation
I've confirmed that:
- The
--json
flag is included in the command in the source code - The same command works correctly in my local environment
- The issue appears specific to the GitHub Actions environment
forge Version: 1.0.0-nightly
Please let me know if you need any additional information to help diagnose and fix this issue.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels