Skip to content

iota client ptb fails if there is a # comment #9432

@Thoralf-M

Description

@Thoralf-M

Bug description

Running a script with a PTB command that includes a comment like # some comment fails with command not found: --move-call

iota client ptb \
# some comment
--move-call iota::tx_context::sender \
--assign sender \
--split-coins gas "[1]" \
--assign coin \
--transfer-objects "[coin]" sender \
--dry-run

There is even a file that includes comments https://github.com/iotaledger/iota/blob/develop/crates/iota/tests/ptb_files/comments/ptb_with_comments.ptb, but this doesn't seem to be sufficient to work with bash/zsh

When fixing this issue, only run cargo commands in the crates/iota/ dir as it will otherwise take much longer to compile. The ptb logic is in crates/iota/src/client_ptb/

Expected behaviour

Commented lines should be ignored

Actual behaviour

ptb parser stops

Metadata

Metadata

Assignees

Labels

dev-toolsIssues related to the Developer Tools Team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions