Skip to content

sjgtool.sh実行時に「integer expression expected」エラーが発生 #501

@akyo3

Description

@akyo3

sjgtool.sh 実行時に以下のエラーが発生しました。

<エラー内容>

./sjgtool.sh: line 559: [: null: integer expression expected

調べるとactive_epoch や future_pledge の値が null の場合に整数比較でエラーになる可能性があるです。

例えば以下のように、空やnullの場合は0をデフォルト値として扱う処理にすると回避できるかもしれません。

if [ ${active_epoch:-0} -gt ${current_epoch:-0} ] && [ ${future_pledge:-0} -ne ${current_pledge:-0} ]; then

■該当URL

if [ $active_epoch -gt $current_epoch ] && [ $future_pledge -ne $current_pledge ]; then

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions