内部スクリプトでエラーが発生した場合は、Dockerコンテナを停止しないでください。

内部スクリプトでエラーが発生した場合は、Dockerコンテナを停止しないでください。

コマンドが失敗し、dockerコンテナで終了するdocker内部スクリプトのカスケード失敗を避けたいと思います( echo time fmriprep)。このコマンドのエラーを無視してcontinueを求めますinput=/tmp/preproc/fmriprep && \。スクリプトは次のとおりです。

if [ ! -f "/input/preproc/fmriprep/sub-"${subject_id}".html" ]
    then
    ( echo `time fmriprep /input/BIDS /tmp/preproc participant --skip-bids-validation --fs-license-file /opt/freesurfer/license.txt --ignore fieldmaps --fs-no-reconall --use-aroma --force-bbr --participant_label $subject_id -w /tmp/preproc || true` ) && \
    cp -r /tmp/preproc /input &
else
        mkdir -p /tmp/preproc/fmriprep
        cp -r /input/preproc/fmriprep/sub-${subject_id}/ /tmp/preproc/fmriprep
fi && \
    input=/tmp/preproc/fmriprep && \

追加しようとしましたが、|| true役に立ちませんでした。

ベストアンサー1

おすすめ記事